disas/microblaze: Remove unused REG_PC define
PATCH 1/1 disas/microblaze: Remove unused REG_PC define
The REG_PC define in disas/microblaze.c clashes with a define in the Linux SPARC system headers:
/home/pm215/qemu/disas/microblaze.c:162:0: error: "REG_PC" redefined [-Werror]
#define REG_PC 32 /* PC */
In file included from /usr/include/signal.h:326:0,
from /home/pm215/qemu/include/qemu/osdep.h:86,
from /home/pm215/qemu/disas/microblaze.c:36:/usr/include/sparc64-linux-gnu/sys/ucontext.h:96:0: note: this is the location of the previous definition
#define REG_PC (1)
Since the code doesn't actually use the REG_PC define anywhere, the simplest fix is just to remove it.
--- disas/microblaze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
disas/microblaze.c +1 -1
@@ -159,7 +159,7 @@ enum microblaze_instr_type {#define MIN_PVR_REGNUM 0#define MAX_PVR_REGNUM 15 -#define REG_PC 32/* PC */ +/* 32 is REG_PC */ #define REG_MSR 33/* machine status reg */ #define REG_EAR 35/* Exception reg */ #define REG_ESR 37/* Exception reg */
Signature · 1 line
2.7.4
Quoted 6 lines · Peter Maydell
The
REG_PCdefine indisas/microblaze.cclashes with a define in the Linux SPARC system headers:
/home/pm215/qemu/disas/microblaze.c:162:0: error: "REG_PC" redefined [-Werror]
#defineREG_PC32 /* PC */
Quoted 8 lines
In file included from
/usr/include/signal.h:326:0,from /home/pm215/qemu/include/qemu/osdep.h:86, from /home/pm215/qemu/disas/microblaze.c:36:
/usr/include/sparc64-linux-gnu/sys/ucontext.h:96:0: note: this is the location of the previous definition
#defineREG_PC(1)Since the code doesn't actually use the
REG_PCdefine anywhere, the simplest fix is just to remove it.
Quoted 22 lines
Signed-off-by Peter Maydell <[email protected]>--- disas/microblaze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)disas/microblaze.c +1
-1@@ -159,7 +159,7 @@ enum microblaze_instr_type {#define MIN_PVR_REGNUM 0#define MAX_PVR_REGNUM 15 -#define REG_PC 32/* PC */ +/* 32 is REG_PC */ #define REG_MSR 33/* machine status reg */ #define REG_EAR 35/* Exception reg */ #define REG_ESR 37/* Exception reg */ Signature · 1 line
2.7.4
Quoted 13 lines · Edgar E. Iglesias
Quoted 12 lines · Peter Maydell
The
REG_PCdefine indisas/microblaze.cclashes with a define in the Linux SPARC system headers:
/home/pm215/qemu/disas/microblaze.c:162:0: error: "REG_PC" redefined [-Werror]
#defineREG_PC32 /* PC */In file included from
/usr/include/signal.h:326:0,from /home/pm215/qemu/include/qemu/osdep.h:86, from /home/pm215/qemu/disas/microblaze.c:36:
/usr/include/sparc64-linux-gnu/sys/ucontext.h:96:0: note: this is the location of the previous definition
#defineREG_PC(1)
Quoted 5 lines
Quoted 2 lines
Since the code doesn't actually use the
REG_PCdefine anywhere, the simplest fix is just to remove it.Reviewed-by Edgar E. Iglesias <[email protected]>
Thanks; applied to master.
-- PMM