diff options
| author | Mark Mendell <mark.p.mendell@intel.com> | 2015-04-01 12:51:05 -0400 | 
|---|---|---|
| committer | Mark Mendell <mark.p.mendell@intel.com> | 2015-04-10 12:08:31 -0400 | 
| commit | a5c19ce8d200d68a528f2ce0ebff989106c4a933 (patch) | |
| tree | 4638a8d8e5b1562ec5ed05967490fec1ef7f0d17 /test/MultiDexModifiedSecondary/Second.java | |
| parent | 6d80318c382a3490ab605b46fa7cb22c5e823fec (diff) | |
[optimizing] Improve x86 parallel moves/swaps
Add a new constructor to ScratchRegisterScope that will supply a
register if there is a free one, but not spill to force one.  Use this
to generated alternate code that doesn't use a temporary, as the
spill/restore of a register generates extra instructions that aren't
necessary on x86.
Here is the benefit for a 32 bit memory-to-memory exchange with no
free registers:
<        50    	       push eax
<        53    	       push ebx
<  8B44244C    	       mov eax, [esp + 76]
<  8B5C246C    	       mov ebx, [esp + 108]
<  8944246C    	       mov [esp + 108], eax
<  895C244C    	       mov [esp + 76], ebx
<        5B    	       pop ebx
<        58    	       pop eax
---
>  FF742444    	       push [esp + 68]
>  FF742468    	       push [esp + 104]
>  8F44244C    	       pop [esp + 72]
>  8F442468    	       pop [esp + 100]
Avoid using xchg instruction, as it is slow on smaller processors.
Change-Id: Id29ee3abd998577baaee552d55d23e60ae0c7871
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'test/MultiDexModifiedSecondary/Second.java')
0 files changed, 0 insertions, 0 deletions
