This is an archive of the discontinued LLVM Phabricator instance.

[mips] Added -gpsize=0 to a test case as this is required in order to emit the same code as GAS.
AbandonedPublic

Authored by s.egerton on Feb 10 2016, 9:24 AM.

Details

Summary

In one case, GAS will emit slightly different code without this option.
The IAS's behaviour does not change with or without this option.

Diff Detail

Event Timeline

s.egerton updated this revision to Diff 47470.Feb 10 2016, 9:24 AM
s.egerton retitled this revision from to [mips] Added -gpsize=0 to a test case as this is required in order to emit the same code as GAS..
s.egerton updated this object.
s.egerton added reviewers: dsanders, vkalintiris.
s.egerton added a subscriber: llvm-commits.
vkalintiris edited edge metadata.Feb 29 2016, 9:18 AM

I'm not sure I understand what is the goal of this patch. Could you explain a little more why we might need to set -gpsize to 0 explicitly for this test?

dsanders edited edge metadata.Feb 29 2016, 3:45 PM

In one case, GAS will emit slightly different code without this option.
The IAS's behaviour does not change with or without this option.

Can you describe the difference? Also, if IAS isn't emitting the same output as GAS for the same input and equivalent options then that indicates a bug in IAS that ought to be fixed.

This change looks correct but it appears to expose a bug. One of the tests in macro-la-64bit.s emits different code to GAS. IAS gives:

2f0:   34068000        li      a2,0x8000
2f4:   00c6302d        daddu   a2,a2,a2

where the li clobbers the third operand of the daddu, whereas GAS emits:

2f0:   34018000        li      at,0x8000
2f4:   0026302d        daddu   a2,at,a2

I cannot recall the exact difference but I believe it is the 32bit equivalent of this difference. I can get more details on this if required. The correct behavior for when the -gpsize=0 option is not given has not been implemented yet. When it is implemented this test will start to fail without this option present.

Currently dla instructions on 32-bit do not support using the 'at' register. The behavior is different to GAS unless using the -gpsize=0 option as the behavior without this option has not yet been implemented.

dsanders resigned from this revision.Jul 12 2019, 4:13 PM
s.egerton abandoned this revision.Jul 31 2019, 2:25 AM