[PATCH] ARM: support stack probe emission for Windows on ARM
Renato Golin
renato.golin at linaro.org
Wed Apr 2 01:40:38 PDT 2014
Hi Saleem,
The code seems a bit too specific (ie. Function symbols and registers) but I can't see a better way of doing this in a generic way. If no one has a better idea, apart from my other comments, looks good to me.
thanks,
--renato
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:192
@@ -190,1 +191,3 @@
+ if (!AFI->hasStackFrame() &&
+ !(NumBytes >= 4080 /* 4096 */ && STI.isTargetWindows())) {
if (NumBytes - ArgRegsSaveSize != 0) {
----------------
A better comment here would be good
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:290
@@ +289,3 @@
+ if (STI.isTargetWindows()) {
+ if (NumBytes >= 4080 /* 4096 */) {
+ uint32_t NumWords = NumBytes >> 2;
----------------
Maybe make it a constant, name it appropriately and comment on the constant?
================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:321
@@ +320,3 @@
+ .addReg(ARM::R12, RegState::Kill)
+ .addReg(ARM::R4, RegState::Implicit);
+ break;
----------------
I don't know much about the Windows ABI, but are those registers fixed by it? Or are them just the "next available GPRs on either side"?
http://llvm-reviews.chandlerc.com/D3255
More information about the llvm-commits
mailing list