提交 b2fed34a 编写于 作者: G Gustavo Romero 提交者: Michael Ellerman

selftests/powerpc: Adjust wild_bctr to build with old binutils

Currently the selftest wild_bctr can fail to build when an old gcc is
used, notably on gcc using a binutils version <= 2.27, because the
assembler does not support the integer suffix UL.

This patch adjusts the wild_bctr test so the REG_POISON value is still
treated as an unsigned long for the shifts on compilation but the UL
suffix is absent on the stringification, so the inline asm code
generated has no UL suffixes.
Signed-off-by: NGustavo Romero <gromero@linux.vnet.ibm.com>
[mpe: Wrap long line]
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 66f93c5a
...@@ -47,8 +47,9 @@ static int ok(void) ...@@ -47,8 +47,9 @@ static int ok(void)
return 0; return 0;
} }
#define REG_POISON 0x5a5aUL #define REG_POISON 0x5a5a
#define POISONED_REG(n) ((REG_POISON << 48) | ((n) << 32) | (REG_POISON << 16) | (n)) #define POISONED_REG(n) ((((unsigned long)REG_POISON) << 48) | ((n) << 32) | \
(((unsigned long)REG_POISON) << 16) | (n))
static inline void poison_regs(void) static inline void poison_regs(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册