Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cfeb9a6 authored by Helge Deller's avatar Helge Deller Committed by Kyle McMartin
Browse files

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: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarKyle McMartin <kyle@mcmartin.ca>
parent 7f384ce7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -129,27 +129,27 @@

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

	/* The PA 2.0 shift left */
	.macro shlw r, sa, t
	depw,z	\r, 31-\sa, 32-\sa, \t
	depw,z	\r, 31-(\sa), 32-(\sa), \t
	.endm

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

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

	/* pa20w version of shift right */
	.macro shrd r, sa, t
	extrd,u \r, 63-\sa, 64-\sa, \t
	extrd,u \r, 63-(\sa), 64-(\sa), \t
	.endm

	/* load 32-bit 'value' into 'reg' compensating for the ldil
+3 −3
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@
	 * abstractions for the macros */
	.macro		EXTR	reg1,start,length,reg2
#ifdef CONFIG_64BIT
	extrd,u		\reg1,32+\start,\length,\reg2
	extrd,u		\reg1,32+(\start),\length,\reg2
#else
	extrw,u		\reg1,\start,\length,\reg2
#endif
@@ -376,7 +376,7 @@

	.macro		DEP	reg1,start,length,reg2
#ifdef CONFIG_64BIT
	depd		\reg1,32+\start,\length,\reg2
	depd		\reg1,32+(\start),\length,\reg2
#else
	depw		\reg1,\start,\length,\reg2
#endif
@@ -384,7 +384,7 @@

	.macro		DEPI	val,start,length,reg
#ifdef CONFIG_64BIT
	depdi		\val,32+\start,\length,\reg
	depdi		\val,32+(\start),\length,\reg
#else
	depwi		\val,\start,\length,\reg
#endif