http://codereview.chromium.org/150226/diff/5/1005
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/150226/diff/5/1005#newcode3378
Line 3378: __ testl(obj.reg(), Immediate(kSmiTagMask));
On 2009/07/02 14:14:08, Mads Ager wrote:
> On 2009/07/02 13:48:31, Erik Corry wrote:
> > Do we need an l here?  Will that preclude an 8 bit immediate being
used?

> I'm using testl for consistency with the rest of the code.  I believe
the
> encoding for testl is shorter.


testl does not preclude an 8-bit encoding of the immediate.  testb would
work just as well, but no better.  We just want to avoid the REX prefix
in cases where we don't need it.

http://codereview.chromium.org/150226/diff/5/1005#newcode3386
Line 3386: __ cmpb(tmp.reg(), Immediate(FIRST_JS_OBJECT_TYPE));
On 2009/07/02 14:14:08, Mads Ager wrote:
> On 2009/07/02 13:48:31, Erik Corry wrote:
> > CmpObjectType?

> Can't on x64/ia32 because the map register is clobbered by
CmpObjectType.  Maybe
> we should add another argument to CmpObjectType as on ARM.

On x64 and ia32, the map register isn't clobbered by CmpObjectType
anymore, so CmpObjectType can be followed by a CmpInstanceType that uses
the map register found by it.

CmpObjectType(obj.reg(), FIRST_JS_OBJECT_TYPE, tmp_reg());
null.Branch(less);
CmpInstanceType(tmp.reg(), JS_FUNCTION_TYPE);
function.Branch(equal);

should work fine on both ia32 and x64.  On x64 one can also use
kScratchRegister.

http://codereview.chromium.org/150226/diff/5/1005#newcode3401
Line 3401: __ CmpObjectType(obj.reg(), JS_FUNCTION_TYPE, tmp.reg());
kScratchRegister, rather than tmp, can be used here.

http://codereview.chromium.org/150226

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to