11 years, 6 months ago
(2009-06-17 09:37:11 UTC)
#3
http://codereview.chromium.org/125185/diff/1/4
File src/x64/assembler-x64.cc (right):
http://codereview.chromium.org/125185/diff/1/4#newcode1232
Line 1232: emit(0x40 | (dst.code() & 0x8) >> 1| (src.code() & 0x8) >> 3);
It is a REX prefix, but the current methods expect Register, not MMXRegister, so
they didn't apply.
If we become serious about adding MMX instructions, we'll need emit-rex's for
MMX registers too. For now, I have removed it all.
http://codereview.chromium.org/125185/diff/1/5
File src/x64/assembler-x64.h (right):
http://codereview.chromium.org/125185/diff/1/5#newcode478
Line 478: void movzxq_b(Register dst, const Operand& src);
This was just a bad adoptation of the ia32 notation.
I'll change it to movzxbq (readability is ... not so impressive, though :)
Eventually, I guess we'll have an mxyzptlk instruction for something.
http://codereview.chromium.org/125185/diff/1/5#newcode814
Line 814:
For now we just use plain old f-operations. I'll remove these again, since I
didn't use them anyway.
http://codereview.chromium.org/125185/diff/1/6
File src/x64/codegen-x64.cc (right):
http://codereview.chromium.org/125185/diff/1/6#newcode554
Line 554: __ addq(rax, rbx); // add optimistically
On 2009/06/17 08:27:48, William Hesse wrote:
> I think we want addl here. If our smis are zero-extended 32-bit smis, then we
> want the overflow flag to indicate an overflow into bit 33. I think we can
make
> this code work for 32-bit smis, on x64.
Smis are sign-extended 32-bit numbers.
http://codereview.chromium.org/125185/diff/1/6#newcode670
Line 670: __ cmpq(rax, Immediate(0xc0000000));
On 2009/06/17 08:27:48, William Hesse wrote:
> cmpl, and many previous instructions should be changed.
Should be cmpq, to get sign extension on the immediate.
http://codereview.chromium.org/125185/diff/1/6#newcode858
Line 858: __ ret(0);
Changed.
Although, somehow, I find ret(0) more readable than Ret(). Guess the capital
letter stands out.
William Hesse
http://codereview.chromium.org/125185/diff/1/6 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/125185/diff/1/6#newcode670 Line 670: __ cmpq(rax, Immediate(0xc0000000)); On 2009/06/17 09:37:11, Lasse Reichstein ...
11 years, 6 months ago
(2009-06-17 11:31:37 UTC)
#4
http://codereview.chromium.org/125185/diff/1/6
File src/x64/codegen-x64.cc (right):
http://codereview.chromium.org/125185/diff/1/6#newcode670
Line 670: __ cmpq(rax, Immediate(0xc0000000));
On 2009/06/17 09:37:11, Lasse Reichstein wrote:
> On 2009/06/17 08:27:48, William Hesse wrote:
> > cmpl, and many previous instructions should be changed.
>
> Should be cmpq, to get sign extension on the immediate.
No, we need both negative and positive numbers to become negative by subtracting
this negative number. Only a 32-bit addition of this 32-bit number will work,
that sets the sign flag based on bit 31 of the result. cmpl is the correct
instruction, that takes 32-bit operands, does the 32-bit math, and sets the bits
based on the 32-bit result, then stores the zero-extended result in the register
(but cmp does not store its result). For addl and subl, where you want the
result to be sign-extended, do a real sign-extension operation after the tests.
It may be that zero-extended smis and sign-extended smis can be mixed together,
if we only every look at their low 32 bits.
Lasse Reichstein
New version uploaded, please recheck. http://codereview.chromium.org/125185/diff/1/6 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/125185/diff/1/6#newcode670 Line 670: __ cmpq(rax, Immediate(0xc0000000)); ...
11 years, 6 months ago
(2009-06-17 11:37:10 UTC)
#5
Issue 125185: X64: Implementation of a bunch of stubs, and some new opcodes.
(Closed)
Created 11 years, 6 months ago by Lasse Reichstein
Modified 9 years, 6 months ago
Reviewers: William Hesse
Base URL:
Comments: 17