OSDN Git Service

Fix bug in arith.ll (ARM) tests.
authorKarl Schimpf <kschimpf@google.com>
Wed, 10 Feb 2016 18:30:46 +0000 (10:30 -0800)
committerKarl Schimpf <kschimpf@google.com>
Wed, 10 Feb 2016 18:30:46 +0000 (10:30 -0800)
commit47898280edb6a9f6cfd0af5e676415022ecc5b77
tree0d3dd6dfe720b22a2248572495ccd43b5ee626c1
parentcfc25533574c4636a53089622a478ecbda9b4daf
Fix bug in arith.ll (ARM) tests.

CL https://codereview.chromium.org/1687553002 introduced a bug when
running:

   make -f Makefile.standalone check-lit FORCEASM=1

The cause of the problem is the way options "--asemble --disassemble"
work in run-pnacl-sz.py. When compiling using "--filetype=asm", the
assembler writes:

   .word 0xe7fedef0

The output after assembly/disassembly is the same as above.

On the other hand, when compiling using "--filetype=iasm", the assembler
writes:

   .byte 0xe7
   .byte 0xfe
   .byte 0xde
   .byte 0xf0

While the same sequence of bytes is assembled, the dissassembly for the
latter generates assembly instruction:

    udf #60896 ; 0xede0

The fix is to not check the generated disassembled instructions. Rather,
have it check if the same word is associated with the assembly
instruction.

Longer term, we should fix the several different ways --filetype=asm
introduces this instruction to match the "udf ..." output.

BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/1682253003 .
tests_lit/llvm2ice_tests/arith.ll