mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Workaround for GCC 4.2 bug.
This commit is contained in:
parent
89a73d27f0
commit
218d38d4e2
@ -54,19 +54,19 @@ struct AnyRegisterID {
|
||||
|
||||
AnyRegisterID()
|
||||
: reg_((unsigned)-1)
|
||||
{}
|
||||
{ pin(); }
|
||||
|
||||
AnyRegisterID(const AnyRegisterID &o)
|
||||
: reg_(o.reg_)
|
||||
{}
|
||||
{ pin(); }
|
||||
|
||||
AnyRegisterID(JSC::MacroAssembler::RegisterID reg)
|
||||
: reg_((unsigned)reg)
|
||||
{}
|
||||
{ pin(); }
|
||||
|
||||
AnyRegisterID(JSC::MacroAssembler::FPRegisterID reg)
|
||||
: reg_(JSC::MacroAssembler::TotalRegisters + (unsigned)reg)
|
||||
{}
|
||||
{ pin(); }
|
||||
|
||||
static inline AnyRegisterID fromRaw(unsigned reg);
|
||||
|
||||
@ -77,6 +77,16 @@ struct AnyRegisterID {
|
||||
bool isSet() { return reg_ != unsigned(-1); }
|
||||
|
||||
inline const char * name();
|
||||
|
||||
private:
|
||||
void pin() {
|
||||
/*
|
||||
* Workaround for apparent compiler bug in GCC 4.2. If GCC thinks that reg_
|
||||
* cannot escape then it compiles isReg() and other accesses to reg_ incorrectly.
|
||||
*/
|
||||
static unsigned *v;
|
||||
v = ®_;
|
||||
}
|
||||
};
|
||||
|
||||
struct Registers {
|
||||
|
Loading…
Reference in New Issue
Block a user