Skip to content

Commit 57032fc

Browse files
committed
Merge pull request #1008 from masaohamanaka/master
RZ/A1H - Fix a bug that build error will occur in GCC.
2 parents 40d3a79 + 0f00f3a commit 57032fc

File tree

2 files changed

+34
-34
lines changed
  • libraries/mbed/targets/cmsis

2 files changed

+34
-34
lines changed

libraries/mbed/targets/cmsis/TARGET_RENESAS/TARGET_RZ_A1H/TOOLCHAIN_GCC_ARM/startup_RZ1AH.s

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ __HeapLimit:
113113
.align 2
114114
.globl __isr_vector
115115
__isr_vector:
116-
.long 0xe59ff018 // 0x00
117-
.long 0xe59ff018 // 0x04
118-
.long 0xe59ff018 // 0x08
119-
.long 0xe59ff018 // 0x0c
120-
.long 0xe59ff018 // 0x10
121-
.long 0xe59ff018 // 0x14
122-
.long 0xe59ff018 // 0x18
123-
.long 0xe59ff018 // 0x1c
116+
.long 0xe59ff018 /* 0x00 */
117+
.long 0xe59ff018 /* 0x04 */
118+
.long 0xe59ff018 /* 0x08 */
119+
.long 0xe59ff018 /* 0x0c */
120+
.long 0xe59ff018 /* 0x10 */
121+
.long 0xe59ff018 /* 0x14 */
122+
.long 0xe59ff018 /* 0x18 */
123+
.long 0xe59ff018 /* 0x1c */
124124

125125
.long Reset_Handler /* 0x20 */
126126
.long Undef_Handler /* 0x24 */

libraries/mbed/targets/cmsis/TOOLCHAIN_GCC/TARGET_CORTEX_A/cache.s

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,47 @@ __v7_all_cache:
3838

3939
PUSH {R4-R11}
4040

41-
MRC p15, 1, R6, c0, c0, 1 // Read CLIDR
42-
ANDS R3, R6, #0x07000000 // Extract coherency level
43-
MOV R3, R3, LSR #23 // Total cache levels << 1
44-
BEQ Finished // If 0, no need to clean
41+
MRC p15, 1, R6, c0, c0, 1 /* Read CLIDR */
42+
ANDS R3, R6, #0x07000000 /* Extract coherency level */
43+
MOV R3, R3, LSR #23 /* Total cache levels << 1 */
44+
BEQ Finished /* If 0, no need to clean */
4545

46-
MOV R10, #0 // R10 holds current cache level << 1
47-
Loop1: ADD R2, R10, R10, LSR #1 // R2 holds cache "Set" position
48-
MOV R1, R6, LSR R2 // Bottom 3 bits are the Cache-type for this level
49-
AND R1, R1, #7 // Isolate those lower 3 bits
46+
MOV R10, #0 /* R10 holds current cache level << 1 */
47+
Loop1: ADD R2, R10, R10, LSR #1 /* R2 holds cache "Set" position */
48+
MOV R1, R6, LSR R2 /* Bottom 3 bits are the Cache-type for this level */
49+
AND R1, R1, #7 /* Isolate those lower 3 bits */
5050
CMP R1, #2
51-
BLT Skip // No cache or only instruction cache at this level
51+
BLT Skip /* No cache or only instruction cache at this level */
5252

53-
MCR p15, 2, R10, c0, c0, 0 // Write the Cache Size selection register
54-
ISB // ISB to sync the change to the CacheSizeID reg
55-
MRC p15, 1, R1, c0, c0, 0 // Reads current Cache Size ID register
56-
AND R2, R1, #7 // Extract the line length field
57-
ADD R2, R2, #4 // Add 4 for the line length offset (log2 16 bytes)
53+
MCR p15, 2, R10, c0, c0, 0 /* Write the Cache Size selection register */
54+
ISB /* ISB to sync the change to the CacheSizeID reg */
55+
MRC p15, 1, R1, c0, c0, 0 /* Reads current Cache Size ID register */
56+
AND R2, R1, #7 /* Extract the line length field */
57+
ADD R2, R2, #4 /* Add 4 for the line length offset (log2 16 bytes) */
5858
LDR R4, =0x3FF
59-
ANDS R4, R4, R1, LSR #3 // R4 is the max number on the way size (right aligned)
60-
CLZ R5, R4 // R5 is the bit position of the way size increment
59+
ANDS R4, R4, R1, LSR #3 /* R4 is the max number on the way size (right aligned) */
60+
CLZ R5, R4 /* R5 is the bit position of the way size increment */
6161
LDR R7, =0x7FFF
62-
ANDS R7, R7, R1, LSR #13 // R7 is the max number of the index size (right aligned)
62+
ANDS R7, R7, R1, LSR #13 /* R7 is the max number of the index size (right aligned) */
6363

64-
Loop2: MOV R9, R4 // R9 working copy of the max way size (right aligned)
64+
Loop2: MOV R9, R4 /* R9 working copy of the max way size (right aligned) */
6565

66-
Loop3: ORR R11, R10, R9, LSL R5 // Factor in the Way number and cache number into R11
67-
ORR R11, R11, R7, LSL R2 // Factor in the Set number
66+
Loop3: ORR R11, R10, R9, LSL R5 /* Factor in the Way number and cache number into R11 */
67+
ORR R11, R11, R7, LSL R2 /* Factor in the Set number */
6868
CMP R0, #0
6969
BNE Dccsw
70-
MCR p15, 0, R11, c7, c6, 2 // DCISW. Invalidate by Set/Way
70+
MCR p15, 0, R11, c7, c6, 2 /* DCISW. Invalidate by Set/Way */
7171
B cont
7272
Dccsw: CMP R0, #1
7373
BNE Dccisw
74-
MCR p15, 0, R11, c7, c10, 2 // DCCSW. Clean by Set/Way
74+
MCR p15, 0, R11, c7, c10, 2 /* DCCSW. Clean by Set/Way */
7575
B cont
76-
Dccisw: MCR p15, 0, R11, c7, c14, 2 // DCCISW, Clean and Invalidate by Set/Way
77-
cont: SUBS R9, R9, #1 // Decrement the Way number
76+
Dccisw: MCR p15, 0, R11, c7, c14, 2 /* DCCISW, Clean and Invalidate by Set/Way */
77+
cont: SUBS R9, R9, #1 /* Decrement the Way number */
7878
BGE Loop3
79-
SUBS R7, R7, #1 // Decrement the Set number
79+
SUBS R7, R7, #1 /* Decrement the Set number */
8080
BGE Loop2
81-
Skip: ADD R10, R10, #2 // increment the cache number
81+
Skip: ADD R10, R10, #2 /* increment the cache number */
8282
CMP R3, R10
8383
BGT Loop1
8484

0 commit comments

Comments
 (0)