Skip to contentSkip to conversation

disas/microblaze: Remove unused REG_SP macro

PATCH In review Richard Henderson 2 participants 2 messages Dec 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disas/microblaze: Remove unused REG_SP macro

This causes a build error with debian sid, riscv64 host:

disas/microblaze.c:179: error: "REG_SP" redefined [-Werror]
#define REG_SP 1 /* stack pointer */

In file included from /usr/include/signal.h:306,

                 from include/qemu/osdep.h:101,
                 from disas/microblaze.c:36:
/usr/include/riscv64-linux-gnu/sys/ucontext.h:36: note: this is the location of the previous definition
 # define REG_SP 2
---
 disas/microblaze.c | 1 -
 1 file changed, 1 deletion(-)
disas/microblaze.c +0 -1
index 598ecbc89d..c23605043a 100644
@@ -176,7 +176,6 @@ enum microblaze_instr_type {
 #define REG_TLBSX 36869 /* MMU: TLB Search Index reg */
 
 /* alternate names for gen purpose regs */
-#define REG_SP  1 /* stack pointer */
 #define REG_ROSDP 2 /* read-only small data pointer */
 #define REG_RWSDP 13 /* read-write small data pointer */
 
Signature · 1 line
2.17.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Richard Henderson

This causes a build error with debian sid, riscv64 host:

disas/microblaze.c:179: error: "REG_SP" redefined [-Werror]
#define REG_SP 1 /* stack pointer */

In file included from /usr/include/signal.h:306,

                 from include/qemu/osdep.h:101,
                 from disas/microblaze.c:36:
/usr/include/riscv64-linux-gnu/sys/ucontext.h:36: note: this is the location of the previous definition
 # define REG_SP 2
---
 disas/microblaze.c | 1 -
 1 file changed, 1 deletion(-)
disas/microblaze.c +0 -0
index 598ecbc89d..c23605043a 100644

disas/microblaze.c enum microblaze_instr_type { · line 179

Quoted 4 lines
disas/microblaze.c +0 -1
@@ -176,7 +176,6 @@ enum microblaze_instr_type {
 #define REG_TLBSX 36869 /* MMU: TLB Search Index reg */
 
 /* alternate names for gen purpose regs */
-#define REG_SP  1 /* stack pointer */

This is clever than my previous suggestion:
https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg00171.html

Quoted 4 lines
disas/microblaze.c +0 -0
 #define REG_ROSDP 2 /* read-only small data pointer */
 #define REG_RWSDP 13 /* read-write small data pointer */