Closed Bug 481761 Opened 15 years ago Closed 15 years ago

TM: ARM backend cleanup

Categories

(Core :: JavaScript Engine, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

References

Details

(Keywords: fixed1.9.1)

Attachments

(10 files)

14.30 KB, patch
graydon
: review+
Details | Diff | Splinter Review
16.84 KB, patch
graydon
: review+
Details | Diff | Splinter Review
22.65 KB, patch
graydon
: review+
Details | Diff | Splinter Review
2.68 KB, patch
graydon
: review+
Details | Diff | Splinter Review
4.02 KB, patch
graydon
: review+
Details | Diff | Splinter Review
7.14 KB, patch
graydon
: review+
Details | Diff | Splinter Review
2.46 KB, patch
graydon
: review+
Details | Diff | Splinter Review
1.15 KB, patch
graydon
: review+
Details | Diff | Splinter Review
4.79 KB, patch
vlad
: review+
Details | Diff | Splinter Review
5.26 KB, patch
vlad
: review+
Details | Diff | Splinter Review
This is the start of a merge with upstream tamarin tracemonkey ARM stuff, though with some changes.  There's a number of patches here in series.
Some simple cleanup -- rename ccName to condName, rename Scratch register to IP.
Attachment #365764 - Flags: review?(graydon)
Step 1 of ALU conversion macros; also gets rid of some x86isms (MOV instead of MR, etc).
Attachment #365767 - Flags: review?(graydon)
Converts ADD, SUB, some shifts, TEST, and CMP to ALU macros.
Attachment #365772 - Flags: review?(graydon)
Some minor asm_cmov cleanup.
Attachment #365774 - Flags: review?(graydon)
Rename condition codes for MOV to match ARM instead of x86 names
Attachment #365777 - Flags: review?(graydon)
Make load and store functions instead of convoluted macros.  Also, apparently, changes the MOV_cond macro so the condition comes first in the args instead of last.
Attachment #365782 - Flags: review?(graydon)
On ARMv6t2 or newer, use MOVW/MOVT to load 32-bit constants instead of reading from memory.  Note that this patch has this protected by NJ_ARM_HAVE_MOVW, but the patch in bug 480796 builds on top of this series to remove the ifdefs and do the the detection at runtime.
Attachment #365783 - Flags: review?(graydon)
_Dm -> _Dn in a NanoAssert; might have problems building with DEBUG without this on Windows CE (since those macros end up being used on CE only).
Attachment #365784 - Flags: review?(graydon)
Attachment #365764 - Flags: review?(graydon) → review+
Attachment #365767 - Flags: review?(graydon) → review+
Comment on attachment 365767 [details] [diff] [review]
2 - ALU macros, step 1

Hmm, actually, can you modify the comment on the ALU macros to explain the cond argument as well? And/or possibly wire it to AL in the macro, excluding the cond argument altogether, if we're actually not using the condition-bit system in instruction selection? It looks to me like we're not (it's sort of an exotic thing that requires semantics beyond our assembler interface, for most uses...)
Attachment #365772 - Flags: review?(graydon) → review+
Comment on attachment 365772 [details] [diff] [review]
3 - ALU macros, step 2

I'm liking that the macros are getting smaller and/or being factored out into functions. I wonder if the ALU ones can be turned into calls to real functions -- after CPP stringifying and token-pasting the 'op' argument -- the same way you converted the add and sub immediates. Thoughts?

Also (though it can be a followup patch) all the final ALU macros should probably use _arg forms not arg forms, as the other macros do, to reduce possible name collisions.
Attachment #365774 - Flags: review?(graydon) → review+
Attachment #365777 - Flags: review?(graydon) → review+
Attachment #365782 - Flags: review?(graydon) → review+
Comment on attachment 365783 [details] [diff] [review]
7 - add code for using MOVT/MOVW for 32-bit loads

Fine but same comment as before: the macros are doing more than CPP-only stuff, should move majority to helper function. Fine as follow-up patch.
Attachment #365783 - Flags: review?(graydon) → review+
Attachment #365784 - Flags: review?(graydon) → review+
Two more quick ones..

Get rid of the hardcoded loads in asm_quad and just use LD32, so that intelligent things happen for 0, 16-bit values, etc.

Also change the jmp macros to use the existing B_cond macro.
Attachment #368530 - Flags: review?(graydon)
(Final one, I'll land this whole set today, I promise!)

We were missing a few underrunProtects, usually with LD32_nochk.. fix that, and get rid of LD32_nochks as we can.
Attachment #368531 - Flags: review?
Attachment #368531 - Flags: review? → review?(graydon)
Attachment #368531 - Flags: review?(graydon) → review+
Attachment #368530 - Flags: review?(graydon) → review+
All checked in, finally.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: wanted1.9.1+
Keywords: fixed1.9.1
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: