2004-05-24 Jie Zhang * config/tc-ia64.c (emit_one_bundle): Check if the application register is accessed by the right execution unit. Index: tc-ia64.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-ia64.c,v retrieving revision 1.109 diff -c -3 -p -r1.109 tc-ia64.c *** tc-ia64.c 6 May 2004 22:32:44 -0000 1.109 --- tc-ia64.c 23 May 2004 16:46:02 -0000 *************** emit_one_bundle () *** 6388,6393 **** --- 6388,6425 ---- continue; /* try next slot */ } + /* Make sure that application register is accessed by the + right execution unit. */ + for (j = 0; j < NELEMS (idesc->operands); j++) + { + expressionS *e; + + if (idesc->operands[j] == IA64_OPND_NIL) + break; + + e = & md.slot[curr].opnd[j]; + + /* If application register is accessed by the wrong + execution unit, we report an error. */ + if (e->X_op == O_register + && e->X_add_number > REG_AR + && e->X_add_number <= REG_AR + 128) + { + if (ar_is_in_integer_unit (e->X_add_number) + && insn_unit != IA64_UNIT_I) + as_bad_where (md.slot[curr].src_file, + md.slot[curr].src_line, + "appliction register %d can only be accessed by I-unit", + (int)(e->X_add_number - REG_AR)); + else if (!ar_is_in_integer_unit (e->X_add_number) + && insn_unit != IA64_UNIT_M) + as_bad_where (md.slot[curr].src_file, + md.slot[curr].src_line, + "appliction register %d can only be accessed by M-unit", + (int)(e->X_add_number - REG_AR)); + } + } + { bfd_vma addr;