mirror of https://github.com/aamine/cbc
* net/loveruby/cflat/sysdep/x86/CodeGenerator.java: refactoring: rename method: doesIndirectAccess -> shouldUsePLT.
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4299 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
eedb1294e3
commit
9ada80d267
|
@ -1,3 +1,8 @@
|
|||
Sun Jun 21 19:15:19 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/sysdep/x86/CodeGenerator.java: refactoring:
|
||||
rename method: doesIndirectAccess -> shouldUsePLT.
|
||||
|
||||
Sun Jun 21 17:14:56 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/sysdep/x86/CodeGenerator.java: assign address
|
||||
|
|
|
@ -118,16 +118,13 @@ public class CodeGenerator implements net.loveruby.cflat.sysdep.CodeGenerator,
|
|||
}
|
||||
else {
|
||||
Symbol sym = globalSymbol(func.symbolString());
|
||||
return doesIndirectAccess(func) ? PLTSymbol(sym) : sym;
|
||||
return shouldUsePLT(func) ? PLTSymbol(sym) : sym;
|
||||
}
|
||||
}
|
||||
// #@@}
|
||||
|
||||
// condition to use indirect access (using PLT to call, GOT to refer).
|
||||
// In PIC, we do use indirect access for all global variables.
|
||||
// In PIE, we do use direct access for file-local reference.
|
||||
// #@@range/doesIndirectAccess{
|
||||
private boolean doesIndirectAccess(Entity ent) {
|
||||
// #@@range/shouldUsePLT{
|
||||
private boolean shouldUsePLT(Entity ent) {
|
||||
return options.isPositionIndependent() && !optimizeGvarAccess(ent);
|
||||
}
|
||||
// #@@}
|
||||
|
|
Loading…
Reference in New Issue