5b0cbc8d721ff369c76e09ff1e7ab878ffcae4e9 |
|
26-Sep-2016 |
Pierre Langlois <pierre.langlois@arm.com> |
Use assembler directly in generated assembler tests A recent patch taught the MacroAssembler to optimize some instructions before calling to the asssembler. These optimizations do not rely on delegates. However, this introduced failures in our assembler tests since we were relying on the MacroAssembler calling the Assembler directly, for convevience in the test generator. For example, the MacroAssembler does not generate any instructions when one calls "Add(reg, reg, 0)" for example. But of course, the Assembler should still generate an instruction and it should be tested that it does. This means we cannot get away with using the MacroAssembler in generated tests anymore. This patch changes the test generator to have assembler tests call assembler methods instead of macro-assembler methods. We still use a MacroAssembler object, but generate the instruction under test using a AssemblerAccurateScope. One major change in this patch is how we handle generating IT instructions. Of course, we could previously rely on the MacroAssembler to generate them, we now need to do it ourselves. Finally, this patch also adds an assertion in generated assembler test that actually fails the test! It seems I forgot to add it before and we didn't see the regressions, sorry about that. Change-Id: Ia904a8a11613cf33abe197858c8a8ce66e4e7add
/external/vixl/tools/test_generator/parser.py
|