On 06/22/2016 11:44 AM, Georg-Johann Lay wrote:
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.
One of the H8 series might have had similar properties. H8 stuff is getting rather fuzzy for me these days.

I vaguely recall code somewhere that detected when the resulting program wouldn't fit into the address space and gracefully exited with an error. I think it was the linker that compiled and something in dejagnu knew to look for that error. IT's probably worth digging around a bit to find that code and see if it can be re-used.

jeff


Reply via email to