intrinsic that makes runtime choice whether to revert to java (original) (raw)
Deneau, Tom tom.deneau at amd.com
Fri Jun 29 18:22:04 PDT 2012
- Previous message: Request for reviews (XS): 7180769: assert(tboth->klass_is_exact()) failed: klass should be exact
- Next message: x86-64 stub calling convention
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all --
I am writing a hotspot intrinsic but I want it to make a runtime choice whether to execute the intrinsic code or to execute the regular java code.
I got the suggestion below from Vladimir but I am not experienced enough with the graphkit functionality to see how to do this. Would someone be able to provide the code skeleton for this? I can generate the region to actually do my intrinsic and I believe I can generate the BoolNode which determines which path to take.
The other choice would be to modify the actual JDK library routine to do the runtime tests and call a new routine which the intrinsic would hook into. I have done this for testing but I am assuming this is more intrusive since on some architectures the intrinsic will not even be generated.
-- Tom Deneau
We don't have such mechanism currently. But it is not difficult to implement. Look on the code in doCall.cpp and callGenerator files. Instead of calling findintrinsic() you need to do something special for your case. Like code for CallGenerator::formethodhandlecall() where you will generate class check and on one path you will get intrinsic (by calling findintrinsic()) and on other path is regular CallGenerator::forinline().
- Previous message: Request for reviews (XS): 7180769: assert(tboth->klass_is_exact()) failed: klass should be exact
- Next message: x86-64 stub calling convention
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list