Extend the hack of r182730 to trick GAS/GCC into compiling access to

STICK/STICK_COMPARE independently of the selected instruction set by
TICK_COMPARE so tick.c as of r214358 once again can be compiled with
gcc -mcpu=v9 for reference purposes.
This commit is contained in:
Marius Strobl 2010-12-21 22:03:12 +00:00
parent 644f6439f1
commit 05bcfef170
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216628
2 changed files with 6 additions and 4 deletions

View File

@ -174,11 +174,13 @@ int fasword32(u_long asi, void *addr, uint32_t *val);
} while (0)
/*
* Trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently
* Trick GAS/GCC into compiling access to TICK/(S)TICK_COMPARE independently
* of the selected instruction set.
*/
#define rdtickcmpr() rd(asr23)
#define rdstick() rd(asr24)
#define rdstickcmpr() rd(asr25)
#define wrtickcmpr(val, xor) wr(asr23, (val), (xor))
#define wrstick(val, xor) wr(asr24, (val), (xor))
#define wrstickcmpr(val, xor) wr(asr25, (val), (xor))
@ -191,7 +193,7 @@ int fasword32(u_long asi, void *addr, uint32_t *val);
* aligned to a quadword boundary in order to ensure that I$ misses won't
* split them up.
*/
#define wrtickcmpr(val, xor) ({ \
#define wrtickcmpr_bbwar(val, xor) ({ \
__asm __volatile( \
" ba,pt %%xcc, 1f ; " \
" nop ; " \

View File

@ -132,14 +132,14 @@ static void
tick_wr_cmpr(uint64_t tick_cmpr)
{
wr(tick_cmpr, tick_cmpr, 0);
wrtickcmpr(tick_cmpr, 0);
}
static void
tick_wr_cmpr_bbwar(uint64_t tick_cmpr)
{
wrtickcmpr(tick_cmpr, 0);
wrtickcmpr_bbwar(tick_cmpr, 0);
}
static uint64_t