OSDN Git Service

Dump the current code stream when the assembler fails on size issues.
authorBen Cheng <bccheng@android.com>
Wed, 23 Mar 2011 21:37:40 +0000 (14:37 -0700)
committerBen Cheng <bccheng@android.com>
Thu, 24 Mar 2011 19:05:24 +0000 (12:05 -0700)
commit4a93f98b174701daf68f9b3a96faf76b54c9caea
tree8b55ff9736edfe6fcc8f990c864792c1cd34c8a0
parentf54258b98c9ab941881625e5509bb902088a99e6
Dump the current code stream when the assembler fails on size issues.

Since the assembler is very robust and will recover from such problems,
adding the verbose/noisy mode will make it easier to detect overly
aggressive optimizations that don't actually work.

Example:

D/dalvikvm( 2348): Assembler abort #1 on 1
D/dalvikvm( 2348): kThumbBCond@16: delta=260
                 :

Instruction at 0x16 is a conditional branch:
D/dalvikvm( 2348): 0x16 (0016): beq     0x0000001a (L0xb6c0c)
                 :

Label at L0xb6c0c is a PC reconstruction cell:
D/dalvikvm( 2348): L0xb6c0c:
D/dalvikvm( 2348): -------- reconstruct dalvik PC : 0x401854d6 @ +0x002b
D/dalvikvm( 2348): 0x11e (011e): ldr     r0, [r15pc, #0]
D/dalvikvm( 2348): 0x122 (0122): b       0x00000126 (L0xb685c)

where 0x11e - 0x16 - 4 = 260

Change-Id: Icbc3dae581949f5976722e24e38f04ec882c7d79
vm/compiler/codegen/arm/ArchUtility.c
vm/compiler/codegen/arm/Assemble.c