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

Issue 1214693004: ARM lowering integer divide and remainder, with div by 0 checks. (Closed)

Created:
5 years, 5 months ago by jvoung (off chromium)
Modified:
5 years, 5 months ago
Reviewers:
Karl, Jim Stichnoth, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

ARM lowering integer divide and remainder, with div by 0 checks. ARM normally just returns 0 when dividing by 0 with the software and hw implementations, which is different from what X86 does. So, for NaCl, we've modified LLVM to trap by inserting explicit 0 checks. Uses -mattr=hwdiv-arm attribute to decide if 32-bit sdiv/udiv are supported. Also lower the unreachable-inst to a trap-inst, since we need a trap instruction for divide by 0 anyway. Misc: fix switch test under MINIMAL=1, since ARM requires allow_dump for filetype=asm. Random clang-format changes... TODO: check via cross tests BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=6ec369ebee62c3aab7fb7334d0bf3fac3a7133e5

Patch Set 1 #

Patch Set 2 : fix up 64 #

Patch Set 3 : rebase, refactor, and fix switch MINIMAL=1 #

Total comments: 3

Patch Set 4 : consolidate cmp and tst #

Patch Set 5 : random stuff #

Patch Set 6 : fill in todo #

Total comments: 14

Patch Set 7 : review fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+646 lines, -191 lines) Patch
M runtime/szrt.c View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceInstARM32.h View 1 2 3 4 5 6 13 chunks +177 lines, -57 lines 0 comments Download
M src/IceInstARM32.cpp View 1 2 3 4 11 chunks +103 lines, -73 lines 0 comments Download
M src/IceInstX8632.cpp View 3 chunks +2 lines, -3 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 3 4 5 6 12 chunks +72 lines, -14 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 6 9 chunks +175 lines, -34 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 2 3 4 5 6 5 chunks +28 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/arith.ll View 1 2 3 4 5 6 5 chunks +58 lines, -5 lines 0 comments Download
M tests_lit/llvm2ice_tests/switch-opt.ll View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/unreachable.ll View 1 2 3 4 5 2 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
jvoung (off chromium)
https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h File src/IceInstARM32.h (right): https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h#newcode265 src/IceInstARM32.h:265: Label, Would it make sense to just make Label ...
5 years, 5 months ago (2015-06-29 21:44:29 UTC) #2
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h File src/IceInstARM32.h (right): https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h#newcode265 src/IceInstARM32.h:265: Label, On 2015/06/29 21:44:28, jvoung wrote: > ...
5 years, 5 months ago (2015-06-30 14:14:09 UTC) #3
jvoung (off chromium)
Thanks https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h File src/IceInstARM32.h (right): https://codereview.chromium.org/1214693004/diff/40001/src/IceInstARM32.h#newcode265 src/IceInstARM32.h:265: Label, On 2015/06/30 14:14:08, stichnot wrote: > On ...
5 years, 5 months ago (2015-06-30 16:58:08 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/1214693004/diff/100001/src/IceTargetLoweringARM32.cpp File src/IceTargetLoweringARM32.cpp (right): https://codereview.chromium.org/1214693004/diff/100001/src/IceTargetLoweringARM32.cpp#newcode1068 src/IceTargetLoweringARM32.cpp:1068: Context.insert(CheckLabel); On 2015/06/30 16:58:08, jvoung wrote: > Really need ...
5 years, 5 months ago (2015-06-30 17:06:51 UTC) #5
jvoung (off chromium)
5 years, 5 months ago (2015-06-30 18:03:20 UTC) #6
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
6ec369ebee62c3aab7fb7334d0bf3fac3a7133e5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698