GBE: refactor double support.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 2 Aug 2013 17:53:44 +0000 (01:53 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Mon, 5 Aug 2013 08:52:37 +0000 (16:52 +0800)
commit455892e4f7823c947824adae3c070ff7d9a11a3a
tree707e330049b2d41e433ccb40f417d52a3eaba34b
parentb9c0c9a0c956ff1daa48f7a84314dc10b7b4575c
GBE: refactor double support.

There are two major issues in double support:
1. Doesn't work at SIMD16 mode.
2. The incorrect usage of vectors. We only need to allocate
those temporary register to contiguous registers.

If you look at the previous implementation of
READ_FLOAT64/WRITE_FLOAT64 in gen_encoder.cpp. You can easily
find it contains many duplicate code and considering the SIMD16
code path never work correctly, it's so difficult to work based
on that code. So I choose to refactor those two major functions.
And refine other parts in the instruction selection stage to fix
the above two major problem with a cleaner code.

Now, it works well on both SIMD16/SIMD8 mode.
Another minor improvement is for the READ_FLOAT64 on SIMD8 mode,
this patch saves one time of send instruction to read all the
8 double data into registers.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Homer Hsing <homer.xing@intel.com>
backend/src/backend/gen_context.cpp
backend/src/backend/gen_encoder.cpp
backend/src/backend/gen_encoder.hpp
backend/src/backend/gen_insn_selection.cpp
backend/src/backend/gen_reg_allocation.cpp
backend/src/backend/gen_register.hpp
backend/src/llvm/llvm_gen_backend.cpp