|
Lines 1-3
Source/JavaScriptCore/ChangeLog_sec1
|
|
|
1 |
2013-10-11 Filip Pizlo <fpizlo@apple.com> |
| 2 |
|
| 3 |
FTL OSR exit should perform zero extension on values smaller than 64-bit |
| 4 |
https://bugs.webkit.org/show_bug.cgi?id=122688 |
| 5 |
|
| 6 |
Reviewed by NOBODY (OOPS!). |
| 7 |
|
| 8 |
In the DFG we usually make the simplistic assumption that a 32-bit value in a 64-bit |
| 9 |
register will have zeros on the high bits. In the few cases where the high bits are |
| 10 |
non-zero, the DFG sort of tells us this explicitly. |
| 11 |
|
| 12 |
But when working with llvm.webkit.stackmap, it doesn't work that way. Consider we might |
| 13 |
emit LLVM IR like: |
| 14 |
|
| 15 |
%2 = trunc i64 %1 to i32 |
| 16 |
stuff %2 |
| 17 |
call @llvm.webkit.stackmap(...., %2) |
| 18 |
|
| 19 |
LLVM may never actually emit a truncation instruction of any kind. And that's great - in |
| 20 |
many cases it won't be needed, like if %2 is a 32-bit op that ignores the high bits |
| 21 |
anyway. Hence LLVM may tell us that %2 is in the register that still had the value from |
| 22 |
before truncation, and that register may have garbage in the high bits. |
| 23 |
|
| 24 |
This means that on our end, if we want a 32-bit value and we want that value to be |
| 25 |
zero-extended, we should zero-extend it ourselves. This is pretty easy and should be |
| 26 |
cheap, so we should just do it and not make it a requirement that LLVM does it on its |
| 27 |
end. |
| 28 |
|
| 29 |
This makes all tests pass with JSC_ftlOSRExitUsesStackmap=true. |
| 30 |
|
| 31 |
* ftl/FTLOSRExitCompiler.cpp: |
| 32 |
(JSC::FTL::compileStubWithOSRExitStackmap): |
| 33 |
* ftl/FTLValueFormat.cpp: |
| 34 |
(JSC::FTL::reboxAccordingToFormat): |
| 35 |
|
| 1 |
2013-10-11 Darin Adler <darin@apple.com> |
36 |
2013-10-11 Darin Adler <darin@apple.com> |
| 2 |
|
37 |
|
| 3 |
Change most call sites to call ICU directly instead of through WTF::Unicode |
38 |
Change most call sites to call ICU directly instead of through WTF::Unicode |