Jeff Law schrieb:
On 06/22/2016 08:21 AM, Georg-Johann Lay wrote:
Some tests for PR71151 assume that the target MCU has a 3-byte PC.  The
tests are failing because the simulator (avrtest) rejects to load the
respective executables if .text exceeds 128KiB, e.g. for -mmcu=atmega128
which has only flash of 128KiB and only a 2-byte PC.

Hence the tests have to be skipped if the target MCU has no 3-byte PC,
hence a new dg-require-effective-target proc supporting "avr_3byte_pc".

I added the new proc right after the last check_effective_target_arm_***
so that the test is in ASCII collating order.

Ok for trunk and v6?
Would it make more sense to have a generic test around the size of the PC and or the size of pointers rather than something AVR specific?

Jeff

At least a test for pointer-size won't work for avr because pointers for avr are 2-byte, yet there are AVR devices with 3-byte PC.

Dunno if other targets need to distinguish between PC sizes like the avr target... For the vast majority of targets stuff like ptr32plus et al. are likely to be the right kinds of filters, but that's not the case for avr -- ptr*plus won't do it.

Actually it's a test for whether avrtest simulator is run for -mmcu=avr51 cores or -mmcu=avr6 cores, so this is quite target specific. It's just the case that 3-byte-pc is more descriptive for avr people and more related to gcc because that feature is tested in many places in the avr BE and even shipped to user land as a built-in macro.

If it helps other targets I could rename it to, say, pc17plus for "Program Counter is at least 17 bits wide".

Johann



Reply via email to