Skip to content

Commit

Permalink
remove dead got related code
Browse files Browse the repository at this point in the history
  • Loading branch information
braddr committed Mar 20, 2013
1 parent d736fbf commit 0fc35d8
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/backend/cod3.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,25 +737,13 @@ void outblkexitcode(block *bl, code*& c, int& anyspill, const char* sflsave, sym
// Mark all registers as destroyed. This will prevent
// register assignments to variables used in catch blocks.
c = cat(c,getregs((I32 | I64) ? allregs : (ALLREGS | mES)));
#if 0 && TARGET_LINUX
if (config.flags3 & CFG3pic && !(allregs & mBX))
{
c = cat(c, cod3_load_got());
}
#endif
goto case_goto;
#endif
#if SCPP
case BCcatch:
// Mark all registers as destroyed. This will prevent
// register assignments to variables used in catch blocks.
c = cat(c,getregs(allregs | mES));
#if 0 && TARGET_LINUX
if (config.flags3 & CFG3pic && !(allregs & mBX))
{
c = cat(c, cod3_load_got());
}
#endif
goto case_goto;

case BCtry:
Expand Down Expand Up @@ -3602,33 +3590,6 @@ targ_size_t cod3_spoff()
return spoff + localsize;
}

/**********************************
* Load value of _GLOBAL_OFFSET_TABLE_ into EBX
*/

code *cod3_load_got()
{
#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
code *c;
code *cgot;

c = genc2(NULL,CALL,0,0); // CALL L1
gen1(c, 0x58 + BX); // L1: POP EBX

// ADD EBX,_GLOBAL_OFFSET_TABLE_+3
symbol *gotsym = Obj::getGOTsym();
cgot = gencs(CNIL,0x81,0xC3,FLextern,gotsym);
cgot->Iflags = CFoff;
cgot->IEVoffset2 = 3;

makeitextern(gotsym);
return cat(c,cgot);
#else
assert(0);
return NULL;
#endif
}

code* gen_spill_reg(Symbol* s, bool toreg)
{
code *c;
Expand Down

0 comments on commit 0fc35d8

Please sign in to comment.