Closed
Bug 480796
Opened 17 years ago
Closed 17 years ago
figure out whether the ARM chip has VFP or v6t2 instructions
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 3 obsolete files)
We need to do this dynamically; it's doable on both linux and Windows CE, though pretty ugly on linux. Seems to work, though.
This removes all the #ifdef NJ_ARM_VFPs, because that code is fine to have; the softfloat filter gets rid of all the floating point instructions, so there's no reason to not have that code.
(Note that we don't yet use armv6t2 movt/movw yet, but now we can.)
Attachment #364748 -
Flags: review?(gal)
| Assignee | ||
Comment 1•17 years ago
|
||
Er, pretend that fprintf isn't there.
| Assignee | ||
Comment 2•17 years ago
|
||
Updated patch -- fixed to apply on top of the series in bug 481761.
Assignee: general → vladimir
Attachment #364748 -
Attachment is obsolete: true
Attachment #365785 -
Flags: review?(graydon)
Attachment #364748 -
Flags: review?(gal)
Comment 3•17 years ago
|
||
Comment on attachment 365785 [details] [diff] [review]
updated patch; builds on top of series in 481761
Sorry. Totally forgot about this patch in my queue.
Attachment #365785 -
Flags: review?(graydon) → review+
| Assignee | ||
Comment 4•17 years ago
|
||
Comment on attachment 365785 [details] [diff] [review]
updated patch; builds on top of series in 481761
Attached wrong (non-updated) patch.
Attachment #365785 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•17 years ago
|
||
Updated; uses setjmp/longjmp correctly to get out of the sighandler.
| Assignee | ||
Comment 6•17 years ago
|
||
Updated and tested on real hardware.
Moved hardware flags to AvmCore::config, like sse2 and cmov, and moved detection to jstracer. We do detection in the linux-approved way now, checking the hwcaps bits in /proc/self/auxv.
Attachment #366767 -
Attachment is obsolete: true
Attachment #368150 -
Flags: review?(graydon)
Updated•17 years ago
|
Attachment #368150 -
Flags: review?(graydon)
Attachment #368150 -
Flags: review?(bhearsum)
Attachment #368150 -
Flags: review+
Updated•17 years ago
|
Attachment #368150 -
Flags: review?(edwsmith)
Comment 7•17 years ago
|
||
Makefile changes need to be reviewed by someone else. Looks good otherwise. The formating changes are a bit unfortunate. It will make merging a lot harder.
Comment 8•17 years ago
|
||
Comment on attachment 368150 [details] [diff] [review]
updated, again
You probably want ted or bsmedberg to review this instead of me.
Attachment #368150 -
Flags: review?(bhearsum)
Comment 9•17 years ago
|
||
Comment on attachment 368150 [details] [diff] [review]
updated, again
detection - cool
It is valuable to be able to hardcode whether or not to use soft float. If config.soft_float is a static const, that might be enough, and still allow the ifdef elimination (which is also nice).
thoughts?
Attachment #368150 -
Flags: review?(edwsmith) → review+
Comment 10•17 years ago
|
||
Comment on attachment 368150 [details] [diff] [review]
updated, again
adding rick since he's integrating vfp support in tamarin as we speak
Attachment #368150 -
Flags: review?(rreitmai)
| Assignee | ||
Comment 11•17 years ago
|
||
(In reply to comment #9)
> (From update of attachment 368150 [details] [diff] [review])
> detection - cool
>
> It is valuable to be able to hardcode whether or not to use soft float. If
> config.soft_float is a static const, that might be enough, and still allow the
> ifdef elimination (which is also nice).
Ah, to eliminate the branches and the other vfp code paths at compile time? How about adding a NJ_FORCE_SOFTFLOAT define that will flip that member to static const, and then that can be set if necessary? I can do that before checking in.
Updated•17 years ago
|
Attachment #368150 -
Flags: review?(rreitmai) → review+
Comment 12•17 years ago
|
||
Comment on attachment 368150 [details] [diff] [review]
updated, again
eek ; just landed a patch that will require re-basing, since I'm sure we will collide.
I like the idea of getting rid of the ifdefs for vfp/softfloat, leaving us the ability to make it dynamic or static (at compile time). Sounds good.
I guess the only issue might be paths (e.g. switches) where we have to leave the code in there for both cases. Not sure that we'll have that much bloat though, so it should be ok.
And compilers that are not savy enough to do the code elimination. Do we have any data on this?
Some other notes on the patch:
(1) Can we hang variable off of Assembler?
(2) Looks like some debugging cruft remaining...see fprintf(stderr, "foo")
| Assignee | ||
Comment 13•17 years ago
|
||
I've got an updated patch that's now stuck in my VM, since I sem to have forgotten to attach it -- will do so shortly. It adds NJ_FORCE_SOFTFLOAT and NJ_FORCE_ARMV6T2 that turns the config variables into static consts.
(In reply to comment #12)
> (From update of attachment 368150 [details] [diff] [review])
> eek ; just landed a patch that will require re-basing, since I'm sure we will
> collide.
>
> I like the idea of getting rid of the ifdefs for vfp/softfloat, leaving us the
> ability to make it dynamic or static (at compile time). Sounds good.
>
> I guess the only issue might be paths (e.g. switches) where we have to leave
> the code in there for both cases. Not sure that we'll have that much bloat
> though, so it should be ok.
>
> And compilers that are not savy enough to do the code elimination. Do we have
> any data on this?
Not sure, but I hope that all the ones in use are smart enough to do so or I think we have bigger problems :) Even if we have a bunch of dead code, as long as the compiler can put in an unconditional branch over it, it shouldn't be that bad; I'd be surprised if there was more than few kb of code.
> Some other notes on the patch:
> (1) Can we hang variable off of Assembler?
Which variable? I followed the same form as the current sse2 and other bits are in the config.
> (2) Looks like some debugging cruft remaining...see fprintf(stderr, "foo")
Huh whoops, I forgot to get rid of that. Was trying to track down an assert, thanks for catching that.. will get rid of it.
| Assignee | ||
Comment 14•17 years ago
|
||
Checked in as http://hg.mozilla.org/tracemonkey/rev/a2752927811d
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Comment 15•17 years ago
|
||
Keywords: fixed1.9.1
Updated•17 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•