Closed
Bug 678681
Opened 13 years ago
Closed 13 years ago
IonMonkey: Implement TestVAndBranch
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: dvander, Assigned: dvander)
References
Details
Attachments
(1 file)
(deleted),
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
We're failing a bunch of tests because of this and it shouldn't be hard to implement.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #555670 -
Flags: review?(sstangl)
Comment 2•13 years ago
|
||
Comment on attachment 555670 [details] [diff] [review]
patch
Review of attachment 555670 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/shared/MacroAssembler-x86-shared.h
@@ +78,5 @@
> jmp(label);
> }
>
> + // cond: NonZero = truthy, Zero = falsey
> + Condition testDoubleTruthy(Condition cond, const FloatRegister ®) {
JS_ASSERT(cond == Assembler::NonZero || cond == Assembler::Zero);
Or even better:
Condition testDoubleTruthinessIs(bool truthiness, const FloatRegister ®) {
::: js/src/ion/x64/CodeGenerator-x64.cpp
@@ +176,5 @@
> + return ScratchReg;
> +}
> +
> +Assembler::Condition
> +CodeGeneratorX64::testStringTruthy(Assembler::Condition cond, const ValueOperand &value)
bool
::: js/src/ion/x64/MacroAssembler-x64.h
@@ +232,5 @@
> loadDouble(*dp, dest);
> }
> +
> + // Equal = true, NotEqual = false
> + Condition testInt32Truthy(Condition cond, const ValueOperand &operand) {
bool truthiness,
@@ +237,5 @@
> + JS_ASSERT(cond == Zero || cond == NonZero);
> + testl(operand.valueReg(), operand.valueReg());
> + return cond;
> + }
> + Condition testBooleanTruthy(Condition cond, const ValueOperand &operand) {
bool truthiness,
::: js/src/ion/x86/CodeGenerator-x86.cpp
@@ +234,5 @@
> + return value.typeReg();
> +}
> +
> +Assembler::Condition
> +CodeGeneratorX86::testStringTruthy(Assembler::Condition cond, const ValueOperand &value)
testStringTruthiness(bool truthiness, const ValueOperand &value) {
::: js/src/ion/x86/MacroAssembler-x86.h
@@ +190,5 @@
> movsd(dp, dest);
> }
> +
> + // cond: NonZero = truthy, Zero = falsey
> + Condition testInt32Truthy(Condition cond, const ValueOperand &operand) {
bool
@@ +195,5 @@
> + JS_ASSERT(cond == Zero || cond == NonZero);
> + testl(operand.payloadReg(), operand.payloadReg());
> + return cond;
> + }
> + Condition testBooleanTruthy(Condition cond, const ValueOperand &operand) {
bool
Attachment #555670 -
Flags: review?(sstangl) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•