diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-06 21:38:57 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-04-06 21:38:57 +0000 |
commit | 03d9f7fda6cde43f88accbe7700f47f5515dfb47 (patch) | |
tree | 86f79c9e9c5bb493036ea570b47ad40fdc25ff58 /llvm/lib/Target/Sparc/SparcSubtarget.h | |
parent | 63742f1379da62a749a569fc76c5ac93e73040ee (diff) | |
download | bcm5719-llvm-03d9f7fda6cde43f88accbe7700f47f5515dfb47.tar.gz bcm5719-llvm-03d9f7fda6cde43f88accbe7700f47f5515dfb47.zip |
SPARC v9 stack pointer bias.
64-bit SPARC v9 processes use biased stack and frame pointers, so the
current function's stack frame is located at %sp+BIAS .. %fp+BIAS where
BIAS = 2047.
This makes more local variables directly accessible via [%fp+simm13]
addressing.
llvm-svn: 178965
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcSubtarget.h')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcSubtarget.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.h b/llvm/lib/Target/Sparc/SparcSubtarget.h index a81931b34aa..b94dd110ea9 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.h +++ b/llvm/lib/Target/Sparc/SparcSubtarget.h @@ -52,6 +52,12 @@ public: } return std::string(p); } + + /// The 64-bit ABI uses biased stack and frame pointers, so the stack frame + /// of the current function is the area from [%sp+BIAS] to [%fp+BIAS]. + int64_t getStackPointerBias() const { + return is64Bit() ? 2047 : 0; + } }; } // end namespace llvm |