Closed
Bug 682061
Opened 13 years ago
Closed 13 years ago
IonMonkey: Implement MTruncateToInt32
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: dvander, Assigned: dvander)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
sstangl
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
This is mostly the same as ValueToInt32.
Attachment #556766 -
Flags: review?(sstangl)
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #556766 -
Attachment is obsolete: true
Attachment #556766 -
Flags: review?(sstangl)
Attachment #556767 -
Flags: review?(sstangl)
Comment 3•13 years ago
|
||
Comment on attachment 556767 [details] [diff] [review]
actual patch
Review of attachment 556767 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/LIR-Common.h
@@ +534,5 @@
>
> +// Convert a double to a truncated int32.
> +// Input: floating-point register
> +// Output: 32-bit integer
> +// Bailout: edge cases of DoubleToECMAInt32
js_DoubleToECMAInt32
::: js/src/ion/Lowering.cpp
@@ +448,5 @@
> +
> + case MIRType_Double:
> + {
> + LTruncateDToInt32 *lir = new LTruncateDToInt32(useRegister(opd));
> + return define(lir, truncate) && assignSnapshot(lir);
Unrelated to this patch, but it would be very useful for instructions with known bail-out points to assert that they have snapshots assigned.
::: js/src/ion/shared/CodeGenerator-x86-shared.cpp
@@ +634,5 @@
> +void
> +CodeGeneratorX86Shared::emitTruncateDouble(const FloatRegister &src, const Register &dest, Label *fail)
> +{
> + masm.cvttsd2si(src, dest);
> + masm.cmpl(dest, Imm32(0x80000000));
#define CVTTSD2SI_INDEFINITE_INTEGER 0x80000000
Attachment #556767 -
Flags: review?(sstangl) → review+
Assignee | ||
Comment 4•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
•