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

Issue 10978045: [MIPS] Use break instruction as NACL_HALT for MIPS. (Closed)

Created:
8 years, 2 months ago by petarj
Modified:
8 years, 2 months ago
Reviewers:
Mark Seaborn
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

[MIPS] Use break instruction as NACL_HALT for MIPS. Replacing previous NACL_HALT (jr $zero) with a break instruction. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2275 TEST= pnacl/build.sh misc-tools

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reuse NACL_HALT_OPCODE in assembler. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -109 lines) Patch
M src/trusted/service_runtime/arch/mips/nacl_syscall.S View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S View 1 2 chunks +8 lines, -6 lines 0 comments Download
M src/trusted/service_runtime/arch/mips/sel_ldr_mips.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M src/trusted/service_runtime/arch/mips/tramp_mips.S View 1 chunk +1 line, -1 line 0 comments Download
M src/trusted/service_runtime/nacl_config.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/trusted/validator_mips/gen/decode.cc View 1 9 chunks +31 lines, -19 lines 0 comments Download
M src/trusted/validator_mips/inst_classes.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/trusted/validator_mips/mips-opt.table View 1 15 chunks +79 lines, -76 lines 0 comments Download
M src/trusted/validator_mips/mips32.table View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
petarj
Replacing NACL_HALT with a break instruction has been previously discussed at: https://chromiumcodereview.appspot.com/10919162/diff/2005/src/trusted/service_runtime/arch/mips/sel_ldr_mips.h#newcode24 Here is the ...
8 years, 2 months ago (2012-09-26 15:50:41 UTC) #1
Mark Seaborn
http://codereview.chromium.org/10978045/diff/1/src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S File src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S (right): http://codereview.chromium.org/10978045/diff/1/src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S#newcode12 src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S:12: #define NACL_HALT 0x0000000D /* opcode for "break", MIPS nacl ...
8 years, 2 months ago (2012-09-26 16:59:24 UTC) #2
petarj
8 years, 2 months ago (2012-09-28 17:55:02 UTC) #3
New patch set uploaded.

http://codereview.chromium.org/10978045/diff/1/src/trusted/service_runtime/ar...
File src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S (right):

http://codereview.chromium.org/10978045/diff/1/src/trusted/service_runtime/ar...
src/trusted/service_runtime/arch/mips/nacl_text_pad_test.S:12: #define NACL_HALT
 0x0000000D  /* opcode for "break", MIPS nacl halt */
On 2012/09/26 16:59:24, Mark Seaborn wrote:
> You could reuse NACL_HALT_OPCODE rather than duplicating a definition here. 
> (Also, it's slightly confusing that NACL_HALT is a #define for an assembly
> instruction elsewhere, not a number.)

Done. You may want to do the same in ARM code.

http://codereview.chromium.org/10978045/diff/1/src/trusted/validator_mips/gen...
File src/trusted/validator_mips/gen/decode.cc (right):

http://codereview.chromium.org/10978045/diff/1/src/trusted/validator_mips/gen...
src/trusted/validator_mips/gen/decode.cc:18: const Branch _Branch_instance;
On 2012/09/26 16:59:24, Mark Seaborn wrote:
> Why do Branch and FPLoadStore get swapped?  Does the validator's generator not
> produce deterministic output?  If not, you might want to fix that.
> 
> With these non-trivial changes to generated code, you might want to find an
> additional reviewer who has reviewed the MIPS validator before.

Validator's generator will produce deterministic output for the same input. In
this case, mips32.table has changed, which resulted in changed mips-opt.table,
and that led us to changes in decode.cc.

The change is not large, yet if you believe someone else should look at
them, please add a person who would be a suitable reviewer (too many people
reviewed the original validator change).

Powered by Google App Engine
This is Rietveld 408576698