Open Source Tools Support’s ポイント

Open Source Tools Support's ポイント

Total 715
0,0,1,0,0,10,0,0,0,15,0,0,0,0,0,0,0,10,3,20,0,0,0,0,0,12,0,0
+10
7月 19, 2024 Answered dataflash library of LLVM for RL78
+1
6月 11, 2024 Commented Hello, A fix was included regarding this issue in the GCC for Renesas RX 8.3.0.202405 release. When using -mint-register=2 -msmall-data-limit=512, RX 8.3.0.202405 produces the following instructions: Source code: #include "iodefines.h" unsigned char Buffer[32]; unsigned char* pHead; unsigned char* pTail; volatile unsigned char Data; void ServiceFastRXI1(void) __attribute__ ((fast_interrupt,optimize("-O2"))); void ServiceFastRXI1(void) { *pHead++ = SCI1.RDR; *pTail++ = Data++; if(&Buffer[32] == pHead) { pTail = pHead = &Buffer[0]; } ICU.IER[15].BIT.IEN6 = 1; return; } void main(void) { int i; pTail = pHead = &Buffer[0]; i = (int)&ServiceFastRXI1; return; } Compiled output: .file "test.c" .section P,"ax" .comm _Buffer,32,1 .comm _pHead,4,4 .comm _pTail,4,4 .comm _Data,1,1 .global _ServiceFastRXI1 .type _ServiceFastRXI1, @function _ServiceFastRXI1: ; Note: Fast Interrupt Handler pushm r1-r5 mov.L #_pHead, r5 mov.L [r5], r3 mov.L #_Data, r1 mov.L #_pTail, r4 add #1, r3, r2 mov.L r2, [r5] mov.L #0x8a020, r2 mov.B 5[r2], r2 mov.B r2, [r3] mov.B [r1], r2 mov.L [r4], r3 add #1, r2, r13 add #1, r3, r12 mov.B r13, [r1] mov.L r12, [r4] mov.B r2, [r3] mov.L [r5], r3 cmp #_Buffer+32, r3 beq .L5 mov.L #0x87000, r5 bset #6, 527[r5].B popm r1-r5 rtfi .L5: mov.L #_Buffer, [r5] mov.L #_Buffer, [r4] mov.L #0x87000, r5 bset #6, 527[r5].B popm r1-r5 rtfi .size _ServiceFastRXI1, .-_ServiceFastRXI1 .global _main .type _main, @function _main: push.l r10 add #-4, r0, r10 mov.L r10, r0 mov.L #_pHead, r5 mov.L #_Buffer, [r5] mov.L #_pHead, r5 mov.L [r5], r4 mov.L #_pTail, r5 mov.L r4, [r5] mov.L #_ServiceFastRXI1, [r10] nop rtsd #8, r10-r10 .size _main, .-_main .ident "GCC: (GCC_Build_8c9e6e87e) 8.3.0.202405-GNURX 20190222" Due to mint-registers being set to 2, GCC is free to use/allocate/trash r13 and r12 in the fast interrupt function, without saving and restoring them. Due to msmall-data-limit > 0, GCC will not allocate r11 anywhere. If you encountered a different behavior, please let us know. Best regards, The Open Source Tools Team
1 2 3 4 9 10 11
サポート