Skip to content

Commit ab1ae79

Browse files
authored
Merge pull request #2063 from stefanrueger/elpm
Disassemble elpm/eijmp/eicall for all XMEGAs
2 parents 65a249e + 0e4bf82 commit ab1ae79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/avr_opcodes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,12 @@ int avr_get_archlevel(const AVRPART *p) {
705705

706706
AVRMEM *mem = avr_locate_flash(p);
707707

708-
if(mem) { // Add opcodes needed for large parts in any case
708+
if(mem) { // Add opcodes needed for large parts (XMEGAs count as large)
709709
if(mem->size > 8192)
710710
ret |= OP_AVR_M; // JMP, CALL
711-
if(mem->size > 65536)
711+
if(mem->size > 65536 || is_pdi(p))
712712
ret |= OP_AVR_L; // ELPM
713-
if(mem->size > 128*1024)
713+
if(mem->size > 128*1024 || is_pdi(p))
714714
ret |= OP_AVR_XL; // EIJMP, EICALL
715715
}
716716

0 commit comments

Comments
 (0)