Mercurial > hg > truffle
comparison src/cpu/x86/vm/assembler_x86.cpp @ 16047:692c25719837
Bugfix: Prefix byte missing for AMD64 byte instructions
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 05 Jun 2014 15:37:57 -0700 |
parents | d49f00604347 |
children | 03eda0a202e9 |
comparison
equal
deleted
inserted
replaced
16046:942e4b7712e1 | 16047:692c25719837 |
---|---|
4565 int Assembler::prefix_and_encode(int dst_enc, int src_enc, bool byteinst) { | 4565 int Assembler::prefix_and_encode(int dst_enc, int src_enc, bool byteinst) { |
4566 if (dst_enc < 8) { | 4566 if (dst_enc < 8) { |
4567 if (src_enc >= 8) { | 4567 if (src_enc >= 8) { |
4568 prefix(REX_B); | 4568 prefix(REX_B); |
4569 src_enc -= 8; | 4569 src_enc -= 8; |
4570 } else if (byteinst && src_enc >= 4) { | 4570 } else if (byteinst && (src_enc >= 4 || dst_enc >= 4)) { |
4571 prefix(REX); | 4571 prefix(REX); |
4572 } | 4572 } |
4573 } else { | 4573 } else { |
4574 if (src_enc < 8) { | 4574 if (src_enc < 8) { |
4575 prefix(REX_R); | 4575 prefix(REX_R); |