diff options
Diffstat (limited to 'testcase/1.c')
-rw-r--r-- | testcase/1.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testcase/1.c b/testcase/1.c index 18e643b..58903bc 100644 --- a/testcase/1.c +++ b/testcase/1.c @@ -42,6 +42,10 @@ void hello(int arg) printf("Just test 'beq hello, PCREL10', so just halt here\n"); while(1); break; +#elif defined (__m32r__) + case 18: + printf("beq r0, r4, hello, 18_PCREL_RELA pass\n"); + break; #else #endif @@ -277,6 +281,31 @@ int rtems(int argc, char **argv) "cmp $r0, $r1\n\t" "beq hello\n\t"); +#elif defined (__m32r__) +#if 1 + __asm__ volatile ( + "push r0\n\t" + "push r4\n\t" + "push r14\n\t" + "ld24 r14, 2f\n\t" + "ldi r0, #18\n\t" + "ldi r4, #18\n\t" + "beq r0, r4, hello\n\t" + "1:\n\t" + ".word global\n\t" + "2:\n\t" + "ld24 r0, 1b\n\t" + "ld r4, @r0\n\t" + "ldi r0, #22\n\t" + "st r0, @r4\n\t" + "pop r14\n\t" + "pop r4\n\t" + "pop r0\n\t" + ); + if (global == 22) + printf("R_M32R_32_RELA, .word global pass\n"); + +#endif #else /* other archs */ #endif |