Closed Bug 549762 Opened 14 years ago Closed 14 years ago

JM: Get JaegerMonkey working on ARM.

Categories

(Core :: JavaScript Engine, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jbramley, Assigned: jbramley)

References

Details

Attachments

(2 files)

The current trunk doesn't compile on ARM as it contains several bits of x86/x64 assembly.
This one isn't exciting, but should probably be a separate commit to the exciting part, so I've kept a separate patch.
Attachment #430415 - Flags: review?(jseward)
There are a couple of catches:

  * Apply this on top of the spew template patch. It should be roughly orthogonal, but it probably isn't quite.

  * Exceptions don't work. I need to work out the best way to handle them. The majority of the trace-tests still pass.
Attachment #430419 - Flags: review?(jseward)
(In reply to comment #2)
> Created an attachment (id=430419) [details]
> Add ARM support to JaegerMonkey.

I was a bit concerned by the swap of arguments here.  Why is
it necessary?  I thought I tested calls-to-args in TestMain.cpp
and it worked OK as-is on ARM.

     Call call(RegisterID target)
     {
         prepareCall();
-        move(ARMRegisters::pc, target);
+        move(target, ARMRegisters::pc);
         JmpSrc jmpSrc;
         return Call(jmpSrc, Call::None);
     }
(In reply to comment #3)

> I was a bit concerned by the swap of arguments here.  Why is
> it necessary?  I thought I tested calls-to-args in TestMain.cpp
> and it worked OK as-is on ARM.

The generated code was backwards: "MOV r0, pc" was done instead of "MOV pc, r0".

The masm interfaces puts the destination register last, and the source register first, like in (some) x86 assembly.

That bug took me _ages_ to track down because I didn't expect the back-end to be broken in that way.
Comment on attachment 430415 [details] [diff] [review]
Spew template for ARMAssembler.h

r+ with the small caveat that Platform.h:284 is changed to

#elif WTF_CPU_ARM_TRADITIONAL && WTF_CPU_ARM_THUMB2 /* Sanity Check */

so it compiles on gcc-4.4.
Attachment #430415 - Flags: review?(jseward) → review+
Attachment #430419 - Flags: review?(jseward) → review+
Pushed two patches: http://hg.mozilla.org/users/danderson_mozilla.com/jaegermonkey/rev/105fb26ac74b

Exceptions are still broken, but that'll be a separate bug I think.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: 547135
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: