Lines Matching refs:code
192 @code = (); # Array of 32 bit words for SIOP
211 # &patch ($address, $offset, $length, $value) patches $code[$address]
222 printf STDERR "Old code : %08x\n", $code[$address];
227 $code[$address] = ($code[$address] & ~$mask) |
228 (($code[$address] & $mask) + ($value << ($offset * 8)) &
231 printf STDERR "New code : %08x\n", $code[$address] if ($debug);
239 # Side effects are that the bytes are combined into the @code array
290 $code[$address] |= 0x00_01_00_00;
309 $code[$address] |= 0x00_08_00_00;
319 $code[$address] |= 0x00_02_00_00;
325 $code[$address] |= $p | 0x00_02_00_00;
354 $code[$address] |= 0x00_04_00_00;
475 $code[$address] = 0x18_00_00_00 | (($with_when =~ /WITH/i) ?
485 $code[$address] = (($with_when =~ /WITH/i) ? 0x00_00_00_00 :
493 $code[$address] = 0xc0_00_00_00;
503 $code[$address], $code[$address+1], $code[$address +2] if
519 $code[$address] = 0x40_00_00_00;
578 $code[$address] |= 0x01_00_00_00;
599 $code[$address] |= 0x38_00_00_00 |
602 $code[$address] |= 0x30_00_00_00 |
605 $code[$address] |= 0x28_00_00_00 |
615 $code[$address] |= $operators{$op};
618 $code[$address] |= $operators{$op};
619 $code[$address + 1] = 0x00_00_00_00;# Reserved
637 $code[$address] = 0x40_00_00_00 |
639 $code[$address + 1] = 0x00_00_00_00;
647 $code[$address] = 0x42_00_00_00 |
649 $code[$address + 1] = 0x00_00_00_00;
666 $code[$address] = 0x48_00_00_00;
667 $code[$address + 1] = 0x00_00_00_00;
671 $code[$address] = 0x50_00_00_00;
687 $code[$address] = ($set =~ /SET/i) ? 0x58_00_00_00 :
691 $code[$address] |= 0x00_00_00_08;
693 $code[$address] |= 0x00_00_00_40;
695 $code[$address] |= 0x00_00_02_00;
697 $code[$address] |= 0x00_00_04_00;
706 $code[$address + 1] = 0x00_00_00_00;
712 $code[$address] = 0x80_00_00_00;
714 $code[$address] = 0x88_00_00_00;
716 $code[$address] = 0x98_00_00_00;
725 $code[$address] |= 0x00_80_00_00;
742 $code[$address] |= (1 << 19);
755 $code[$address] = ($instruction =~ /RETURN/i) ? 0x90_00_00_00 :
766 $code[$address] |= 0x00_08_00_00;
769 $code[$address + 1] = 0x00_00_00_00;
772 $code[$address] = 0x48_00_00_00;
773 $code[$address + 1] = 0x00_00_00_00;
778 $code[$address] = 0x80_88_00_00;
779 $code[$address + 1] = 0x00_00_00_00;
843 $add = $code[$address / 4];
845 $code[$address / 4] = $symbol;
848 $code[$address / 4] = "$symbol + $add";
869 $code[$address / 4] += $symbol_values{$label};
886 $code[$address / 4] = $tmp & 0x00_ff_ff_ff;
893 # print the original code too.
902 for ($i = 0; $i < $#code; ) {
906 printf OUTPUT "\t0x%08x,", $code[$i];
907 printf STDERR "Address $i = %x\n", $code[$i] if ($debug);
908 if ($code[$i + 1] =~ /\s*($identifier)(.*)$/) {
912 printf OUTPUT "0x%08x,",$code[$i+1];
915 if (($code[$i] & 0xff_00_00_00) == 0xc0_00_00_00) {
916 if ($code[$i + 2] =~ /$identifier/) {
917 push (@external_patches, $i+2, $code[$i+2]);
920 printf OUTPUT "0x%08x,\n",$code[$i+2];
959 # the code.