Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Issue 3892003: [gcc] Add clobber FLAGS_REG to NaCl indirect jumps (Closed)

Created:
10 years, 2 months ago by eaeltsin
Modified:
9 years, 7 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

[gcc] Add clobber FLAGS_REG to NaCl indirect jumps Compiler must know that NaCl indirect jump clobbers FLAGS register. For call and return this is probably not important, as FLAGS is always clobbered by call. For computed goto and switch, this IS important, so added explicit clobber. TEST=very hard to reproduce, we only suspect this bug was the reason for LLVM miscompilation. BUG=

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -27 lines) Patch
M gcc/gcc/config/i386/i386.md View 6 chunks +36 lines, -27 lines 3 comments Download

Messages

Total messages: 5 (0 generated)
eaeltsin
10 years, 2 months ago (2010-10-20 13:51:49 UTC) #1
khim
LGTM
10 years, 2 months ago (2010-10-20 14:01:59 UTC) #2
pasko-google - do not use
do you have a test to reproduce the failure? can we commit it somewhere? http://codereview.chromium.org/3892003/diff/1/2 ...
10 years, 2 months ago (2010-10-20 14:25:15 UTC) #3
eaeltsin
Unfortunately we don't have a reproducer, there is only a report from David Meyer that ...
10 years, 2 months ago (2010-10-20 14:30:43 UTC) #4
pasko-google - do not use
10 years, 2 months ago (2010-10-20 14:48:44 UTC) #5
LGTM

http://codereview.chromium.org/3892003/diff/1/2
File gcc/gcc/config/i386/i386.md (right):

http://codereview.chromium.org/3892003/diff/1/2#newcode15274
gcc/gcc/config/i386/i386.md:15274: if (TARGET_NACL)
On 2010/10/20 14:30:43, Evgeny Eltsin wrote:
> On 2010/10/20 14:25:15, pasko wrote:
> > I see no reason in creating an expand that does nothing with !TARGET_NACL.
> > "TARGET_NACL" two lines above?
> 
> You simply forgot that if define_expand preparation statements do not end with
> DONE or FAIL, it outputs the original rtl pattern.

OK, never knew that

Powered by Google App Engine
This is Rietveld 408576698