Skip to content

Commit 2cfeb9a

Browse files
hdellerKyle McMartin
authored andcommitted
parisc: add braces around arguments in assembler macros
Add braces around the macro arguments, else for example "shl %r1, 5-3, %r2" would not expand to what you would assume. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
1 parent 7f384ce commit 2cfeb9a

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎arch/parisc/include/asm/assembly.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,27 +129,27 @@
129129

130130
/* Shift Left - note the r and t can NOT be the same! */
131131
.macro shl r, sa, t
132-
dep,z \r, 31-\sa, 32-\sa, \t
132+
dep,z \r, 31-(\sa), 32-(\sa), \t
133133
.endm
134134

135135
/* The PA 2.0 shift left */
136136
.macro shlw r, sa, t
137-
depw,z \r, 31-\sa, 32-\sa, \t
137+
depw,z \r, 31-(\sa), 32-(\sa), \t
138138
.endm
139139

140140
/* And the PA 2.0W shift left */
141141
.macro shld r, sa, t
142-
depd,z \r, 63-\sa, 64-\sa, \t
142+
depd,z \r, 63-(\sa), 64-(\sa), \t
143143
.endm
144144

145145
/* Shift Right - note the r and t can NOT be the same! */
146146
.macro shr r, sa, t
147-
extru \r, 31-\sa, 32-\sa, \t
147+
extru \r, 31-(\sa), 32-(\sa), \t
148148
.endm
149149

150150
/* pa20w version of shift right */
151151
.macro shrd r, sa, t
152-
extrd,u \r, 63-\sa, 64-\sa, \t
152+
extrd,u \r, 63-(\sa), 64-(\sa), \t
153153
.endm
154154

155155
/* load 32-bit 'value' into 'reg' compensating for the ldil

‎arch/parisc/kernel/entry.S‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,23 +368,23 @@
368368
* abstractions for the macros */
369369
.macro EXTR reg1,start,length,reg2
370370
#ifdef CONFIG_64BIT
371-
extrd,u \reg1,32+\start,\length,\reg2
371+
extrd,u \reg1,32+(\start),\length,\reg2
372372
#else
373373
extrw,u \reg1,\start,\length,\reg2
374374
#endif
375375
.endm
376376

377377
.macro DEP reg1,start,length,reg2
378378
#ifdef CONFIG_64BIT
379-
depd \reg1,32+\start,\length,\reg2
379+
depd \reg1,32+(\start),\length,\reg2
380380
#else
381381
depw \reg1,\start,\length,\reg2
382382
#endif
383383
.endm
384384

385385
.macro DEPI val,start,length,reg
386386
#ifdef CONFIG_64BIT
387-
depdi \val,32+\start,\length,\reg
387+
depdi \val,32+(\start),\length,\reg
388388
#else
389389
depwi \val,\start,\length,\reg
390390
#endif

0 commit comments

Comments
 (0)