From c9aa5fc285452bf5dfe70eec5933d96b5c2b3c30 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 9 Feb 2004 15:44:07 +0000 Subject: 2004-02-09 Ralf Corsepius PR 565/rtems * asm.h: Various hacks. --- cpukit/score/cpu/i386/ChangeLog | 5 +++++ cpukit/score/cpu/i386/asm.h | 13 +++++++++---- cpukit/score/cpu/i386/rtems/asm.h | 13 +++++++++---- 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'cpukit') diff --git a/cpukit/score/cpu/i386/ChangeLog b/cpukit/score/cpu/i386/ChangeLog index bdea802035..a80d111c09 100644 --- a/cpukit/score/cpu/i386/ChangeLog +++ b/cpukit/score/cpu/i386/ChangeLog @@ -1,3 +1,8 @@ +2004-02-09 Ralf Corsepius + + PR 565/rtems + * asm.h: Various hacks. + 2004-01-21 Ralf Corsepius * configure.ac: Move RTEMS_TOP one subdir down. diff --git a/cpukit/score/cpu/i386/asm.h b/cpukit/score/cpu/i386/asm.h index f1981791a3..1793c17015 100644 --- a/cpukit/score/cpu/i386/asm.h +++ b/cpukit/score/cpu/i386/asm.h @@ -43,6 +43,10 @@ * have to define these as appropriate. */ +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ +#endif + /* * Looks like there is a bug in gcc 2.6.2 where this is not * defined correctly when configured as i386-coff and @@ -63,13 +67,16 @@ #define CONCAT1(a, b) CONCAT2(a, b) #define CONCAT2(a, b) a ## b +#define EVAL(x) x +#define CONCAT0(a, b) EVAL(a)EVAL(b) + /* Use the right prefix for global labels. */ -#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) +#define SYM(x) CONCAT0 (__USER_LABEL_PREFIX__, x) /* Use the right prefix for registers. */ -#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) +#define REG(x) CONCAT0 (__REGISTER_PREFIX__, x) #define eax REG (eax) #define ebx REG (ebx) @@ -134,5 +141,3 @@ #endif /* end of include file */ - - diff --git a/cpukit/score/cpu/i386/rtems/asm.h b/cpukit/score/cpu/i386/rtems/asm.h index f1981791a3..1793c17015 100644 --- a/cpukit/score/cpu/i386/rtems/asm.h +++ b/cpukit/score/cpu/i386/rtems/asm.h @@ -43,6 +43,10 @@ * have to define these as appropriate. */ +#ifndef __USER_LABEL_PREFIX__ +#define __USER_LABEL_PREFIX__ +#endif + /* * Looks like there is a bug in gcc 2.6.2 where this is not * defined correctly when configured as i386-coff and @@ -63,13 +67,16 @@ #define CONCAT1(a, b) CONCAT2(a, b) #define CONCAT2(a, b) a ## b +#define EVAL(x) x +#define CONCAT0(a, b) EVAL(a)EVAL(b) + /* Use the right prefix for global labels. */ -#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x) +#define SYM(x) CONCAT0 (__USER_LABEL_PREFIX__, x) /* Use the right prefix for registers. */ -#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x) +#define REG(x) CONCAT0 (__REGISTER_PREFIX__, x) #define eax REG (eax) #define ebx REG (ebx) @@ -134,5 +141,3 @@ #endif /* end of include file */ - - -- cgit v1.2.3