1 r1 Caller Saved. Also used as a temporary by function.
profiler and function prologue/epilogue.
2 r2 sp Stack Pointer.
- 3* r3.w0 ra Return Address (16-bit).
+ 3* r3.w0 Caller saved.
+ 3* r3.w2 ra Return Address (16-bit).
4 r4 fp Frame Pointer, also called Argument Pointer in ABI.
5-13 r5-r13 Callee Saved Registers.
14-29 r14-r29 Register Arguments. Caller Saved Registers.
#define FIXED_REGISTERS \
{ \
-/* 0 */ 0,0,0,0, 0,0,0,0, 1,1,1,1, 1,1,1,1, \
+/* 0 */ 0,0,0,0, 0,0,0,0, 1,1,1,1, 0,0,1,1, \
/* 4 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, \
/* 8 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, \
/* 12 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, \
}
#define PRU_SEQ_R(X) (X) * 4 + 0, (X) * 4 + 1, (X) * 4 + 2, (X) * 4 + 3
+#define PRU_SEQ_R_W0(X) (X) * 4 + 0, (X) * 4 + 1
+#define PRU_SEQ_R_W2(X) (X) * 4 + 2, (X) * 4 + 3
#define REG_ALLOC_ORDER \
{ \
/* Call-clobbered, yet not used for parameters. */ \
PRU_SEQ_R (0), PRU_SEQ_R ( 1), \
+ PRU_SEQ_R_W0 (3), \
\
PRU_SEQ_R (14), PRU_SEQ_R (15), PRU_SEQ_R (16), PRU_SEQ_R (17), \
PRU_SEQ_R (18), PRU_SEQ_R (19), PRU_SEQ_R (20), PRU_SEQ_R (21), \
PRU_SEQ_R (13), \
\
PRU_SEQ_R ( 4), \
- PRU_SEQ_R ( 2), PRU_SEQ_R ( 3), \
+ PRU_SEQ_R ( 2), \
+ PRU_SEQ_R_W2 (3), \
\
/* I/O and virtual registers. */ \
PRU_SEQ_R (30), PRU_SEQ_R (31), PRU_SEQ_R (32), PRU_SEQ_R (33), \
uint64_t l1 = 0x12345678, l2 = 0x87654321, l3 = 1001, l4 = 1002;
uint64_t l5 = 1004;
uint32_t l6 = 2005;
+ uint16_t s1 = 4321;
uint8_t c1 = 101, c2 = 102;
/* The numerous dummy asm input operands create just
: "0" (l1), "r" (a), "r"(b),
"r"(c), "r"(d), "r"(e), "r"(f),
"r"(g), "r"(h), "r"(l2),
- "r"(c1), "r"(c2),
+ "r"(c1), "r"(c2), "r"(s1),
"r"(l3), "r"(l4), "r"(l5), "r"(l6));
- global = a+b+c+d+e+f+g+h + c1+c2 + l2;
+ global = a+b+c+d+e+f+g+h + s1 + c1+c2 + l2;
return l1;
}
uint64_t l1 = 0x12345678, l2 = 0x87654321, l3 = 1001, l4 = 1002;
uint64_t l5 = 1004;
uint32_t l6 = 2005;
+ uint16_t s1 = 4321;
uint8_t c1 = 101, c2 = 102;
/* The numerous dummy asm input operands create just
"add %0, %0, %14\n\t"
"add %0, %0, %15\n\t"
"add %0, %0, %16\n\t"
+ "add %0, %0, %17\n\t"
: "=r" (l1)
: "0" (l1), "r" (a), "r"(b),
"r"(c), "r"(d), "r"(e), "r"(f),
- "r"(g), "r"(h), "r"(c1), "r"(c2),
+ "r"(g), "r"(h), "r"(c1), "r"(c2), "r"(s1),
"r"(l2), "r"(l3), "r"(l4), "r"(l5), "r"(l6));
- global = a+b+c+d+e+f+g+h + c1+c2 + l2+l3+l4+l5+l6;
+ global = a+b+c+d+e+f+g+h + s1 + c1+c2 + l2+l3+l4+l5+l6;
return l1;
}
{
uint64_t a = test(1, 2, 3, 4, 5, 6, 7, 8);
- if (a != 0x98878ae8) {
+ if (a != 0x98879bc9) {
abort();
}
- if (global != 0x876557a4) {
+ if (global != 0x87656885) {
abort();
}
return 0;