Lines Matching refs:imm

600 local function parse_imm(imm, bits, shift, scale, signed)
601 imm = match(imm, "^#(.*)$")
602 if not imm then werror("expected immediate operand") end
603 local n = tonumber(imm)
615 werror("out of range immediate `"..imm.."'")
617 waction("IMM", (signed and 32768 or 0)+scale*1024+bits*32+shift, imm)
622 local function parse_imm12(imm)
623 local n = tonumber(imm)
630 werror("out of range immediate `"..imm.."'")
632 waction("IMM12", 0, imm)
637 local function parse_imm16(imm)
638 imm = match(imm, "^#(.*)$")
639 if not imm then werror("expected immediate operand") end
640 local n = tonumber(imm)
643 werror("out of range immediate `"..imm.."'")
645 waction("IMM16", 32*16, imm)
650 local function parse_imm_load(imm, ext)
651 local n = tonumber(imm)
665 werror("out of range immediate `"..imm.."'")
667 waction(ext and "IMML8" or "IMML12", 32768 + shl(ext and 8 or 12, 5), imm)
753 local imm = match(p2, "^#(.*)$")
754 if imm then
755 local m = parse_imm_load(imm, ext)
768 local imm = match(p2, "^,%s*#(.*)$")
769 if imm then
770 local m = parse_imm_load(imm, ext)
791 local reg, imm = match(q, "^%[%s*([^,%s]*)%s*(.*)%]$")
794 if imm == "" then return d end
795 imm = match(imm, "^,%s*#(.*)$")
796 if imm then
797 local n = tonumber(imm)
802 werror("out of range immediate `"..imm.."'")
804 waction("IMMV8", 32768 + 32*8, imm)
852 local imm = match(q, "^#(.*)$")
853 if imm then
854 op = op + parse_imm12(imm) + 0x02000000
894 local imm = match(q, "^#(.*)$")
895 if imm then
903 local imm = tonumber(match(q, "^#(.*)$")); n = n + 1
904 if not imm or shr(imm, 8) ~= 0 then
907 op = op + shl(band(imm, 0xf0), 12) + band(imm, 0x0f)
909 local imm = tonumber(match(q, "^#(.*)$")); n = n + 1
910 if not imm or shr(imm, 16) ~= 0 then
913 op = op + shl(band(imm, 0xfff0), 4) + band(imm, 0x000f)