GBE: increase the disassembly output's readability.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 22 Jan 2014 02:32:08 +0000 (10:32 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Sun, 26 Jan 2014 08:46:48 +0000 (16:46 +0800)
commit3262ebecac132b0adf168e8f5efc2f6993a1fe92
tree966299552cb13200083abb395047a41570f2ba51
parent6e7d0c03db4e5a9a46d07259958a33e8850aa58c
GBE: increase the disassembly output's readability.

Add label information and the instruction address
prefix. Make the address consistent with fulsim.
And also make the register allocation output a little
bit prettier.

Now the disassembly output is as below:
compiler_ceil's disassemble begin:
  L0:
    (0       )  mov(1)          f0<1>UW         0x0UW                           { align1 WE_all };
    ....
    (32      )  (+f0) mov(16)   g1<1>UW         0x1UW                           { align1 WE_normal 1H };
  L1:
    (34      )  mov(16)         g112<1>UD       g0<8,8,1>UD                     { align1 WE_all 1H };
    ...
compiler_ceil's disassemble end.

The register allocation output is as below:
%26      g2  .8   4  B  [0        -> 0       ]
%28      g2  .12  4  B  [0        -> 6       ]
%29      g2  .16  4  B  [0        -> 9       ]
%30      g126.0   64 B  [2        -> 3       ]
%31      g124.0   64 B  [3        -> 4       ]

Please be noted, the register allocation's output is not correct
when the register is a pure scalar(bool) register which allocated
at the backend instruction selection stage. To be fixed.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
backend/src/backend/gen_context.cpp
backend/src/backend/gen_reg_allocation.cpp