Open Source Tools Support

Open Source Tools Support
664 ポイント. 54 回答 3 質問 2 フォロワー 0 フォロー
The official account for all technical support issues for the Open Source Tools for Renesas platform at https://llvm-gcc-renesas.com

統計

  • 54 answers, 7 selected
  • 3 questions, 0 solved
  • 8 年, 7 ヶ月, 30 日 のメンバー
  • 51397 プロフィール閲覧
  • Last seen 4日 ago

ポイント

Total 664
0,0,12,0,0,10,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0
+1
5日 ago 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

投票数

5 投票獲得 100/100 5up 0down
4 票獲得 100/100 4up 0down

新しい質問

まだ質問がありません
サポート