Re: [Sablevm-developer] pc++ to skip preparation address in (GET|PUT)(FIELD|STATIC)
Brought to you by:
egagnon
From: Grzegorz B. P. <ga...@de...> - 2004-01-27 05:01:58
|
W liście z pon, 26-01-2004, godz. 23:34, Chris Pickett pisze: > Hi Greg, > > I'm almost done merging staging into my tree (should be done tomorrow if > not tonight). Nice. > I notice that instructions.m4.c in staging@r1503 no longer has a pc++ to > skip the preparation address at the beginning of (GET|PUT)(FIELD|STATIC). Right. > How does this address get skipped in the switch interpreter without > inlinability testing? > > You have a some _svmf_no_inlining_increment_pc() function, but it's only > turned on / defined for inlinability testing. > > The other instructions like INVOKE<X> still have the pc++ at the > beginning. I checked in prepare_code.c and the preparation address is > still being used, I'm just wondering where it gets skipped ... First see two_modes.list - it list all two-mode instructions. Then see instructions_preparation.m4.c - there's all logic (or magic) there. See m4svm_mark_start_and_skip macro which has two versions. You're mainly interested in m4svm_mark_start_and_skip_normal. For any two-modes bytecode it generates this code: if (SVM_INLINEABLE_$1 != SVM_INTRP_FLAG_INLINEABLE) pc++; Note, that the result of the comparison is known at comile time as both values are #defines so no real conditional here. Also note, that it depends on the value of SVM_INLINEABLE_$1 of certain bytecode for certain architecture so we don't hardcode pc++ usage in two_modes.list. And for non-inlined engines it does pc++ for all two-modes instructions. HTH Grzegorz B. Prokopski -- Grzegorz B. Prokopski <ga...@de...> Debian GNU/Linux http://www.debian.org SableVM - LGPLed JVM http://www.sablevm.org Why SableVM ?!? http://devel.sablevm.org/wiki/WhySableVM |