Don't use mrs instruction in aarch64-windows
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: away, Assigned: away)
References
Details
Attachments
(1 file)
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Ok, here's the instruction:
(22f0.e34): Illegal instruction - code c000001d (first chance)
(22f0.e34): Illegal instruction - code c000001d (!!! second chance !!!)
xul!vixl::CPU::SetUp+0x4:
00007ffc`60587688 d53b0028 mrs x8,ctr_el0
Anything obviously wrong?
Comment 6•6 years ago
•
|
||
No, nothing seems wrong - the encoding seems correct for reading CTR_EL0 according to the ARMv8 manual.
The only other thing I've been able to find so far is that there's a comment in the pseudocode for CheckSystemAccess()
that says
// Further checks for enables/disables/traps specific to a particular system register
// or operation will be performed in System_Put(), System_Get(), SysOp_W(), or SysOp_R()
which suggests that the system might further restrict access. Indeed, looking in D8.2.21, I find that access to CTR at EL0 is under some configuration bit control, suggesting Windows may choose to limit access (and has so chosen). Since the config registers can't usually be read from EL0 I don't know that we can detect this situation without trying to read CTR_EL0 and handling the exception.
(OK, duh, the comment is what :nbp cited earlier. I guess the new finding here is that it is possible for the system to restrict access to the register. That may be OK on Windows but makes me worried about what we may find in various other environments.)
Comment 9•6 years ago
|
||
bugherder |
Comment hidden (collapsed) |
Description
•