Closed Bug 605421 Opened 15 years ago Closed 15 years ago

libffi: VFP hard-float calling convention support

Categories

(Core :: js-ctypes, defect)

x86
MeeGo
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec - ---

People

(Reporter: naginenis, Assigned: dwitte)

References

Details

(Whiteboard: [has-patch], maemo6)

Attachments

(4 files)

There is a patch for VFP hard-float calling convention support available at http://sourceware.org/ml/libffi-discuss/2010/msg00153.html I think it would be good to push this patch to m-c. Looks like the patch is still not present in git repo for libffi, but it has already been reviewed. http://sourceware.org/ml/libffi-discuss/2010/msg00167.html
Do we need this for a Mozilla product, i.e. Fennec? If so, I'd take it once it's committed upstream -- easy enough to do by pinging Anthony.
OS: Linux → Windows CE
Yes.
OS: Windows CE → MeeGo
yes, it will be needed for hardfp.
Pinged libffi-discuss about the commit.
You guys want this for b3?
tracking-fennec: --- → ?
sounds reasonable. Sounds like the meego toolchain requires it.
tracking-fennec: ? → 2.0b3+
dan, i am going to assign to you since you are doing the leg work.
Assignee: nobody → dwitte
Status: NEW → ASSIGNED
Whiteboard: [has-patch]
dwitte, is this patch ready to when the tree opens?
Well, I wanted to pull from upstream, but apparently it hasn't been committed there yet. I did ping the list. So I can take this patch.
Comment on attachment 484259 [details] [diff] [review] Patch against m-c r=dwitte, I'll land this soonish.
Attachment #484259 - Flags: review+
dwitte, checkin-needed?
tracking-fennec: 2.0b3+ → 2.0+
Anthony rebased the libffi git tree over the weekend. There's a merge mistake that needs to be corrected but hopefully that'll get done today, and I'll push. If not, I'll fix it myself and push anyway. :)
... except the ARM patch doesn't actually build. I've pushed a fix to try and will push to Anthony today if it's good.
I don't think this has been answered yet, so: would we build with this patch on any platforms as it stands? If no, when will we? If yes, what are those platforms, what are we doing on them now, and how do we test that they're working as expected with this patch? (The answer to the last one is "run ctypes tests", but how do we get to that point?)
Whiteboard: [has-patch] → [has-patch], maemo6
dwitte, who were you expecting to answer your questions?
Well, dougt said we need it, so he may be able to elaborate.
timeless can explain.
http://trac.tspre.org/meetbot/meego-meeting/2010/meego-meeting.2010-12-01-20.02.html MeeGo 1.2 as a "platform" allows for hard fp. "Allows" is a bit loose, it's quite likely that no ARM platforms built around MeeGo 1.2 will do !hard fp. The internal numbers seem to show enough of a win such that vendors pushed hard and were willing to disrupt schedules for it. Certain vendors were pushing hard and intend to ship with hard fp as their platform. If anyone wants their browser (or whatever) to be able to be delivered in any way to such MeeGo platforms, they need to support hard fp.
OK. So does that mean we're going to run unit tests on it? Or that someone will? I ask because we can take this patch, and theoretically get a working libffi, which will theoretically get us a working ctypes. But history shows that this will not be the case, at all, unless it's unit tested and proven.
timeless, can you verify that this works for hard fp toolchains + devices that you might have access to?
tracking-fennec: 2.0+ → 2.0-
Sudarsana can do that - we're neighbors. As for unit tests, I'm confident someone will. I'm fairly certain we're currently using this patch internally on Fennec builds. If there's a specific command you'd like run in order to get a report that can be attached or sent to you, please provide it and someone will run it...
'make xpcshell-tests' in toolkit/components/ctypes would satisfy me. Basically, as long as you run unit tests on it, and they pass, then I'm OK with taking this... Do they? ;)
i spoke w/ babu and asked him to provide output for three runs: 1. unpatched 2. with [meego] system libffi 3. patched
Attached file log with patch
> 1. unpatched > 2. with [meego] system libffi > 3. patched I was able to run the tests on device finally. Unit test[test_jsctypes.js] failed in all above cases and the results are same. Please check the results attached.
Attached file log without patch
Attached file log with system libffi
Attachment #498998 - Attachment mime type: text/x-log → text/plain
OK. That means the float-conversion overflow behavior of int64's is different than expected. That's not too hard to fix, but belongs in a separate bug...
oh, minor note, the platform team for meego has decided to break floating point (roughly -ffast-math or something), it's possible that we'd run into this somewhere nearby, that change happened "recently". dwitte: so you'll push for whatever flags are needed and get this pushed?
Comment on attachment 484259 [details] [diff] [review] Patch against m-c Can we get this patch landed? I guess it is just sync with upstream, also this seems works fine (test works)
Attachment #484259 - Flags: approval2.0?
Comment on attachment 484259 [details] [diff] [review] Patch against m-c ok, patch need to be tested on try first
Attachment #484259 - Flags: approval2.0?
Comment on attachment 484259 [details] [diff] [review] Patch against m-c try build pretty green, can we get an approval here?
Attachment #484259 - Flags: approval2.0?
Comment 24 indicates that tests are broken on the platform Nokia is testing. Which, to my understanding, is not covered by anything on tryserver -- which is presumably why we're seeing it pass there. In fact, we don't run any unit tests on Meego/Maemo platforms on try, no? Just Talos. Which means, I bet, that ctypes is broken on Meego/Maemo without VFP hard-float anyway. I think we should land this, since it's not making anything worse; but we should get followup bugs to actually make ctypes tests pass. :)
(In reply to comment #33) > Comment 24 indicates that tests are broken on the platform Nokia is testing. ok, now I see, I'll ask Sudarsana Nagineni
(In reply to comment #27) > OK. That means the float-conversion overflow behavior of int64's is different > than expected. That's not too hard to fix, but belongs in a separate bug... yep, this should be in separate bug... and we cannot probably fix that bug without ability to run tests at all...
Comment on attachment 484259 [details] [diff] [review] Patch against m-c this must not break anything; please run through try before landing.
Attachment #484259 - Flags: approval2.0? → approval2.0+
> this must not break anything; please run through try before landing. already did.. see comment#c32 ;)
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Depends on: 644136
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: