Bug 69978 - MacroAssemblerX86 8-bit register ops unsafe on CPU(X86)
Summary: MacroAssemblerX86 8-bit register ops unsafe on CPU(X86)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 17:02 PDT by Gavin Barraclough
Modified: 2011-10-12 18:50 PDT (History)
1 user (show)

See Also:


Attachments
The fix (12.59 KB, patch)
2011-10-12 17:06 PDT, Gavin Barraclough
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2011-10-12 17:02:51 PDT
Certain ops are unsafe if the register passed is esp..edi (will instead test/set the ).

compare32/test8/test32 Call setCC, which sets an 8-bit register - we can fix this by adding a couple of xchg instructions.

branchTest8 with a register argument is also affected.  In all cases this is currently used this is testing a value that is correct to 32 or more bits, so we can simply switch these to branchTest32 & remove the corresponding branchTest8 (this is desirable anyway, since the 32-bit form is cheaper to implement on platforms that don't have an 8-bit compare instruction).

This fixes the remaining fast/js failures with the DFG JIT 32_64.
Comment 1 Gavin Barraclough 2011-10-12 17:06:24 PDT
Created attachment 110773 [details]
The fix
Comment 2 WebKit Review Bot 2011-10-12 17:09:47 PDT
Attachment 110773 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/ChangeLog:20:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2011-10-12 18:50:59 PDT
Fixed in r97331