TM: clean up ARM code generation / softfloat

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Robert Sayre, Assigned: vlad)

Tracking

unspecified
Other
All
Points:
---
Bug Flags:
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

10 years ago
This almost works. Crowder volunteered for this last week.
(Reporter)

Updated

10 years ago
OS: Mac OS X → All
Hardware: PC → Other

Comment 1

10 years ago
Couple pointers:

- See http://hg.mozilla.org/tamarin-tracing/index.cgi/file/7352b39dc0fa/core/Interpreter.cpp#l971 for the tamarin implementation. Basically we need a bunch of C functions to implement the FP ops and those get called with insCall.

- Tamarin emits insCall at the high level (Interpreter.cpp, our equivalent is jstracer.cpp). We don't really want that. Instead we probably prefer a filter that on the fly translates LIR_fadd and friends to insCall.
Grabbing this -- I've got some patch that makes us go (slowly), and then some speedups.  We really do need to take advantage of the VFP though.
Assignee: crowder → vladimir
Created attachment 334975 [details] [diff] [review]
get tracemonkey working on ARM

Base stuff to get things working on ARM.  trace-tests and sunspider all complete successfully.  This is probably a good starting point to adding native VFP support and other works on the nanojit backend.

I haven't tried the full browser with this enabled yet, but will do so soon.
Attachment #334975 - Flags: review?
Created attachment 335294 [details] [diff] [review]
updated

Updated; the current arm backend assumed that all code and data it cared about would be within the range of a relative jump, which isn't the case after dvander's dynamic page allocation patch.

There's very little code shared between ARM and Thumb in NativeThumb.cpp left; I'm going to create a NativeARM.cpp and split things out as part of implementing VFP support (I know we want to minimize nanojit changes, but these changes are large enough as it is, and it would be cleaner to not have the #ifdefs all over the place).
Attachment #334975 - Attachment is obsolete: true
Attachment #335294 - Flags: review?(gal)
Attachment #334975 - Flags: review?

Comment 5

10 years ago
I think nanojit needs major cleanup. Ed is working some major features in parallel so merging is going to be a pain anyway. Lets go and do the restructuring and then we sit down with Ed next week and negotiate how we can merge things back together. cc'ing Ed.
Sounds good -- to be clear, the big changes are limited to the arm files, which are like 1000 lines of code total; I don't really expect massive pain from this.
Note: LD32_nochk in that patch has a small bug (it doesn't need to underrunProtect, and LD32_size needs to be updated); but I can't update the patch right now because I would conflict the hell out of myself if I did.  It shouldn't break anything, just be a bit wasteful of memory (a few extra words used).

Updated

10 years ago
Attachment #335294 - Flags: review?(gal) → review+
Small fix for attachment (id=335294)
NativeThumb.h
....
  void nativePageSetup();\
+ void flushCache(NIns*,NIns*);\
....
This made it to mozilla-central with the last nanojit pull; not enabled for builds yet.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.