diff options
author | Björn Gustavsson <[email protected]> | 2016-04-09 09:51:10 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-04-14 10:38:49 +0200 |
commit | 9b2ee6cfdc09090df81be40ca1d7358c3d273743 (patch) | |
tree | 31474128fd4e17b7fed209d9decf420aed625cfd /erts/emulator/beam/beam_emu.c | |
parent | 20ffaef67ccaf4f2a7df80d25a88ce8cb2a2a15a (diff) | |
download | otp-9b2ee6cfdc09090df81be40ca1d7358c3d273743.tar.gz otp-9b2ee6cfdc09090df81be40ca1d7358c3d273743.tar.bz2 otp-9b2ee6cfdc09090df81be40ca1d7358c3d273743.zip |
Optimize get_tuple_element instructions that target Y registers
Several improvements in the compiler (e.g. c288ab87fd6) has
lead to an Y register being the target for get_tuple_element
instructions. Therefore, introduce i_get_tuple_element2y
that combines two consecutive get_tuple_element instructions
that target Y registers.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index d648a2f23c..ce92f60fd2 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -702,6 +702,17 @@ void** beam_ops; dst[1] = E2; \ } while (0) +#define GetTupleElement2Y(Src, Element, D1, D2) \ + do { \ + Eterm* src; \ + Eterm E1, E2; \ + src = ADD_BYTE_OFFSET(tuple_val(Src), (Element)); \ + E1 = src[0]; \ + E2 = src[1]; \ + D1 = E1; \ + D2 = E2; \ + } while (0) + #define GetTupleElement3(Src, Element, Dest) \ do { \ Eterm* src; \ |