Closed Bug 1561088 Opened 5 years ago Closed 5 years ago

fix unwind information for libffi assembly on aarch64 windows

Categories

(Core :: JavaScript Engine, defect, P1)

ARM64
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(1 file)

No description provided.

The hand-written assembly for libffi on aarch64/windows doesn't emit
unwind information. If we ever tried to unwind through these functions,
they'd look like leaf functions, which is decidedly not true and would
cause great pain.

For whatever reason, the original aarch64 libffi functions used
x21/x22/x23/x24 as their (callee-saved) scratch registers. This
convention works on windows as well, but the unwind information on
windows mandates that we start saving callee-saved registers starting
from x19, rather than x21. Rather than rewriting the assembly to use
x19/x20 instead of x21/x22, which would be a large change, we chose
instead to simply save/restore extra registers in the prolog/epilog.
This change does make the stack frame sizes slightly bigger, but an
extra 16 bytes in libffi stack frames should not matter.

The -TC change is necessary to make the compiler play nicely with .asm
file suffixes.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task
Type: task → defect
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dcae89181bb2
emit unwind information for libffi aarch64/win assembly; r=dmajor,gsvelto
Priority: -- → P1
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: