* [U-Boot] [PATCH] standalone: delete an unused source file
@ 2014-03-31 4:11 Masahiro Yamada
2014-04-18 13:20 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2014-03-31 4:11 UTC (permalink / raw)
To: u-boot
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
examples/standalone/x86-testapp.c | 100 --------------------------------------
1 file changed, 100 deletions(-)
delete mode 100644 examples/standalone/x86-testapp.c
diff --git a/examples/standalone/x86-testapp.c b/examples/standalone/x86-testapp.c
deleted file mode 100644
index 1e16ec7..0000000
--- a/examples/standalone/x86-testapp.c
+++ /dev/null
@@ -1,100 +0,0 @@
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-
-void *func[8], **pfunc;
-
-typedef struct xxx xxx_t;
-struct xxx {
- int dummy;
- void **pfunc;
-} q;
-
-#define XF_strcpy 3
-#define XF_printf 4
-
-#define LABEL(x) \
-asm volatile ( \
-
-#if defined(__i386__)
-#define EXPORT_FUNC(x) \
-asm volatile ( \
-" .globl mon_" #x "\n" \
-"mon_" #x ":\n" \
-" movl %0, %%eax\n" \
-" movl pfunc, %%ecx\n" \
-" jmp *(%%ecx,%%eax)\n" \
- : : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx");
-#elif defined(__powerpc__)
-#define EXPORT_FUNC(x) \
-asm volatile ( \
-" .globl mon_" #x "\n" \
-"mon_" #x ":\n" \
-" lwz %%r11, %0(%%r2)\n" \
-" lwz %%r11, %1(%%r11)\n" \
-" mtctr %%r11\n" \
-" bctr\n" \
- : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r2");
-#elif defined(__arm__)
-#define EXPORT_FUNC(x) \
-asm volatile ( \
-" .globl mon_" #x "\n" \
-"mon_" #x ":\n" \
-" ldr ip, [r8, %0]\n" \
-" ldr pc, [ip, %1]\n" \
- : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "ip");
-#elif defined(__mips__)
-#define EXPORT_FUNC(x) \
-asm volatile ( \
-" .globl mon_" #x "\n" \
-"mon_" #x ":\n" \
-" lw $25, %0($26)\n" \
-" lw $25, %1($25)\n" \
-" jr $25\n" \
- : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "t9");
-#elif defined(__nds32__)
-#define EXPORT_FUNC(x) \
-asm volatile ( \
-" .globl mon_" #x "\n" \
-"mon_" #x ":\n" \
-" lwi $r16, [$gp + (%0)]\n" \
-" lwi $r16, [$r16 + (%1)]\n" \
-" jr $r16\n" \
-: : "i"(offsetof(xxx_t, pfunc)), \
-"i"(XF_ ## x * sizeof(void *)) : "$r16");
-
-#else
-#error [No stub code for this arch]
-#endif
-
-void dummy(void)
-{
-EXPORT_FUNC(printf)
-EXPORT_FUNC(strcpy)
-}
-
-int main(void)
-{
-#if defined(__i386__)
- xxx_t *pq;
-#elif defined(__powerpc__)
- register volatile xxx_t *pq asm("r2");
-#elif defined(__arm__)
- register volatile xxx_t *pq asm("r8");
-#elif defined(__mips__)
- register volatile xxx_t *pq asm("k0");
-#elif defined(__nds32__)
- register volatile xxx_t *pq asm("$r16");
-#endif
- char buf[32];
-
- func[XF_strcpy] = strcpy;
- func[XF_printf] = printf;
- pq = &q;
- pq->pfunc = pfunc = func;
-
- mon_strcpy(buf, "test");
- mon_printf("hi %s %d z\n", buf, 444);
-
- return 0;
-}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] standalone: delete an unused source file
2014-03-31 4:11 [U-Boot] [PATCH] standalone: delete an unused source file Masahiro Yamada
@ 2014-04-18 13:20 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-04-18 13:20 UTC (permalink / raw)
To: u-boot
On Mon, Mar 31, 2014 at 01:11:43PM +0900, Masahiro Yamada wrote:
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/ea953181/attachment.pgp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-18 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31 4:11 [U-Boot] [PATCH] standalone: delete an unused source file Masahiro Yamada
2014-04-18 13:20 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.