x86-64 stub calling convention (original) (raw)
Vladimir Kozlov vladimir.kozlov at oracle.com
Sat Jun 30 19:35:11 PDT 2012
- Previous message: x86-64 stub calling convention
- Next message: x86-64 stub calling convention
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Currently we use CallRuntime nodes for calling stubs and we use it for calls into runtime (C compiled code) that is why it uses C calling convention. We have RFE to create special calling convention for stubs to pass arguments in registers even in 32-bit VM but we never had time to do it.
Vladimir
On 6/30/12 7:08 PM, Deneau, Tom wrote:
OK, thanks, Vladimir. Is there a good reason for using the OS's C calling convention for stubs? (as opposed to, say, using whatever makes the most sense for Java).
-- Tom
-----Original Message----- From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com] Sent: Friday, June 29, 2012 10:46 PM To: Krystal Mok Cc: Deneau, Tom; hotspot-compiler-dev at openjdk.java.net Subject: Re: x86-64 stub calling convention I was not right that you can use all XMM registers. On windows64 only xmm0-xmm5 are available free, the rest are SOE (save on entry). For stabs calls we use C calling convention. It is described in .ad file where XMM registers are defined (second parameter): // Linux ABI: No register preserved across function calls // XMM0-XMM7 might hold parameters // Windows ABI: XMM6-XMM15 preserved across function calls // XMM0-XMM3 might hold parameters regdef XMM5 (SOC, SOC, OpRegF, 5, xmm5->asVMReg()); regdef XMM5H (SOC, SOC, OpRegF, 5, xmm5->asVMReg()->next()); #ifdef WIN64 regdef XMM6 (SOC, SOE, OpRegF, 6, xmm6->asVMReg()); regdef XMM6H (SOC, SOE, OpRegF, 6, xmm6->asVMReg()->next()); ... #else regdef XMM6 (SOC, SOC, OpRegF, 6, xmm6->asVMReg()); regdef XMM6H (SOC, SOC, OpRegF, 6, xmm6->asVMReg()->next()); Vladimir On 6/29/12 7:25 PM, Krystal Mok wrote: Hi Tom,
This is something I'd like to get an answer to, too. I did see in a comment in one of the older changes [1][2] that: + // Spill because stubs can use any register they like and it's + // easier to restore just those that we care about. Which doesn't really sound reassuring... - Kris [1]: http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/28263a73ebfb [2]: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2011-May/005623.html On Sat, Jun 30, 2012 at 9:27 AM, Deneau, Tom<tom.deneau at amd.com<mailto:tom.deneau at amd.com>> wrote: Hi -- Can someone point me to the x86-64 calling convention for stubs created by stubGenerator? In particular, which xmm registers if any must be preserved and which are volatile. -- Tom Deneau
- Previous message: x86-64 stub calling convention
- Next message: x86-64 stub calling convention
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list