diff options
author | Björn Gustavsson <[email protected]> | 2012-04-10 12:28:11 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-07-03 14:34:58 +0200 |
commit | d252130b8e880f2f7f826217fe806da76fbcbb7c (patch) | |
tree | 6635b56c7e25ac77ca44fa70703627a2fbfe6c07 /erts/emulator/beam/erl_debug.c | |
parent | dddd225934cfe79c052e9013a8a2c1d6a29c8ae0 (diff) | |
download | otp-d252130b8e880f2f7f826217fe806da76fbcbb7c.tar.gz otp-d252130b8e880f2f7f826217fe806da76fbcbb7c.tar.bz2 otp-d252130b8e880f2f7f826217fe806da76fbcbb7c.zip |
Rewrite the hipe_mode_switch instructions
The 'cmd' variable that were shared by several hipe_mode_switch
instructions would cause clang to produce sub-optimal code,
probably because it considered the instructions as part of of
loop that needed to be optimized.
What would was that 'cmd' would be assigned to the ESI register
(lower 32 bits of the RSI register). It would use ESI for other
purposes in instructions, but at the end of every instruction
it would set ESI to 1 just in case the next instruction happened
to be hipe_trap_return. This can be seen clearly if this commit
is omitted and the define HIPE_MODE_SWITCH_CMD_RETURN in
hipe/hipe_mode_switch.h is changed from 1 to some other number
such as 42. You will see that 42 is assigned to ESI at the end
of every instruction.
Eliminate this problem by elimininating the shared 'cmd' variable.
Diffstat (limited to 'erts/emulator/beam/erl_debug.c')
0 files changed, 0 insertions, 0 deletions