this is nice because it leads to simpler code and matches how ##peek and ##replace instructions work
[ update-successor-predecessors ]
2bi ;
-UNION: irrelevant ##peek ##replace ##inc-d ##inc-r ;
+UNION: irrelevant ##peek ##replace ##inc ;
: split-instructions? ( insns -- ? ) [ irrelevant? not ] count 5 <= ;
compiler.cfg.optimizer compiler.cfg.registers
compiler.cfg.representations
compiler.cfg.representations.preferred compiler.cfg.rpo
-compiler.cfg.save-contexts compiler.cfg.scheduling
+compiler.cfg.save-contexts
compiler.cfg.utilities compiler.tree.builder
compiler.tree.optimizer compiler.units hashtables io kernel math
namespaces prettyprint prettyprint.backend prettyprint.custom
: contains-insn? ( quot insn-check -- ? )
count-insns 0 > ; inline
-
-! Random instruction scheduling exposes bugs in
-! compiler.cfg.dependencies
-: random-scheduling ( -- )
- [ \ score [ drop 100 random ] define ] with-compilation-unit ;
[ { } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##add }
T{ ##branch }
[ { } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##alien-invoke }
T{ ##add }
[ { 0 } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##allot }
T{ ##alien-invoke }
[ { 0 } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##allot }
T{ ##allot }
[ { 0 4 } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##allot }
T{ ##alien-invoke }
[ { 3 } ] [
V{
- T{ ##inc-d }
+ T{ ##inc }
T{ ##peek }
T{ ##alien-invoke }
T{ ##allot }
0 get block>cfg cfg set ;
V{
- T{ ##inc-d f 3 }
+ T{ ##inc f 3 }
T{ ##replace f 0 D 1 }
} 0 test-bb
V{
T{ ##peek f 2 D 0 }
- T{ ##inc-d f 3 }
+ T{ ##inc { loc D 3 } }
T{ ##branch }
} 1 test-bb
}
} ;
-HELP: ##inc-d
+HELP: ##inc
{ $class-description
- "An instruction that increases or decreases the data stacks height by n. For example, " { $link 2drop } " decreases it by two and pushing an item increases it by one."
+ "An instruction that increases or decreases a stacks height by n. For example, " { $link 2drop } " decreases the datastacks height by two and pushing an item increases it by one."
} ;
HELP: ##prologue
{ ##set-slot-imm %set-slot-imm } related-words
{ ##set-slot-imm ##set-slot } related-words
+HELP: ##slot-imm
+{ $class-description
+ "Instruction for reading a slot value from an object."
+ { $table
+ { { $slot "dst" } { "Register to read the slot value into." } }
+ { { $slot "obj" } { "Register containing the object with the slot." } }
+ { { $slot "slot" } { "Slot index." } }
+ { { $slot "tag" } { "Type tag for obj." } }
+ }
+} ;
+
HELP: ##replace-imm
{ $class-description
"An instruction that replaces an item on the data or register stack with an " { $link immediate } " value." } ;
HELP: ##write-barrier
{ $class-description
- "An instruction for inserting a write barrier. This instruction is almost always inserted after a " { $link ##set-slot } " instruction. It has the following slots:"
+ "An instruction for inserting a write barrier. This instruction is almost always inserted after a " { $link ##set-slot } " instruction. If the container object is in an older generation than the item inserted, this instruction guarantees that the item will not be garbage collected. It has the following slots:"
{ $table
- { { $slot "src" } { "Object which the writer barrier refers." } }
+ { { $slot "src" } { "Object to which the writer barrier refers." } }
{ { $slot "slot" } { "Slot index of the object." } }
+ { { $slot "scale" } { "No idea." } }
{ { $slot "tag" } { "Type tag for obj." } }
{ { $slot "temp1" } { "First temporary register to clobber." } }
{ { $slot "temp2" } { "Second temporary register to clobber." } }
##slot-imm
##set-slot
##set-slot-imm
+ ##write-barrier
}
"Stack height manipulation:"
{ $subsections
- ##inc-d
- ##inc-r
+ ##inc
} ;
ABOUT: "compiler.cfg.instructions"
INSN: ##replace-imm
literal: src loc ;
-INSN: ##inc-d
-literal: n ;
-
-INSN: ##inc-r
-literal: n ;
+INSN: ##inc
+literal: loc ;
! Subroutine calls
INSN: ##call
USING: accessors arrays compiler.cfg.instructions
compiler.cfg.linear-scan.assignment compiler.cfg.linear-scan.live-intervals
-compiler.cfg.utilities cpu.architecture cpu.x86.assembler.operands grouping
-heaps kernel make namespaces random sequences sorting tools.test ;
+compiler.cfg.registers compiler.cfg.utilities cpu.architecture
+cpu.x86.assembler.operands grouping heaps kernel make namespaces random
+sequences sorting tools.test ;
IN: compiler.cfg.linear-scan.assignment.tests
{ { T{ ##spill { src RAX } } } } [
{ } [
{ } init-assignment
- V{ T{ ##inc-d { n 3 } { insn# 7 } } } 0 insns>block
+ V{
+ T{ ##inc { loc D 3 } { insn# 7 } }
+ } 0 insns>block
assign-registers-in-block
] unit-test
} 0 test-bb
V{
- T{ ##inc-r f 2 }
- T{ ##inc-d f -2 }
+ T{ ##inc { loc R 2 } }
+ T{ ##inc { loc D -2 } }
T{ ##peek f 21 D -1 }
T{ ##peek f 22 D -2 }
T{ ##replace f 21 R 0 }
} 2 test-bb
V{
- T{ ##inc-r f -1 }
- T{ ##inc-d f 1 }
+ T{ ##inc { loc R -1 } }
+ T{ ##inc { loc D 1 } }
T{ ##peek f 25 R -1 }
T{ ##replace f 25 D 0 }
T{ ##branch }
} 4 test-bb
V{
- T{ ##inc-r f -1 }
- T{ ##inc-d f 2 }
+ T{ ##inc f R -1 }
+ T{ ##inc f D 2 }
T{ ##peek f 27 R -1 }
T{ ##peek f 28 D 2 }
T{ ##peek f 29 D 3 }
} 5 test-bb
V{
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
T{ ##branch }
} 6 test-bb
V{
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
T{ ##branch }
} 7 test-bb
V{
T{ ##phi f 36 H{ { 6 30 } { 7 31 } } }
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##unbox f 37 29 "alien_offset" int-rep }
T{ ##unbox f 38 28 "to_double" double-rep }
T{ ##unbox f 39 36 "to_cell" int-rep }
math ;
IN: compiler.cfg.registers
+HELP: vreg-counter
+{ $var-description "Virtual registers, used by CFG and machine IRs, are just integers." } ;
+
HELP: next-vreg
{ $values { "vreg" number } }
{ $description "Creates a new virtual register identifier." }
HELP: loc
{ $class-description "Represents a location on the stack. 'n' is an index starting from the top of the stack going down. So 0 is the top of the stack, 1 is what would be the top of the stack after a 'drop', and so on. It has two subclasses, " { $link ds-loc } " for data stack location and " { $link rs-loc } " for locations on the retain stack." } ;
+ARTICLE: "compiler.cfg.registers" "Virtual single-assignment registers"
+"Virtual register assignment." ;
+
ABOUT: "compiler.cfg.registers"
USING: assocs kernel math namespaces parser sequences ;
IN: compiler.cfg.registers
-! Virtual registers, used by CFG and machine IRs, are just integers
SYMBOL: vreg-counter
: next-vreg ( -- vreg )
: next-vreg-rep ( rep -- vreg )
next-vreg [ set-rep-of ] keep ;
-! ##inc-d and ##inc-r affect locations as follows. Location D 0 before
-! an ##inc-d 1 becomes D 1 after ##inc-d 1.
-TUPLE: loc { n integer read-only } ;
+TUPLE: loc { n integer } ;
TUPLE: ds-loc < loc ;
C: <ds-loc> ds-loc
4 vreg-counter set-global
V{
- T{ ##inc-d f 3 }
+ T{ ##inc f D 3 }
T{ ##box f 4 3 "from_signed_4" int-rep
T{ gc-map { scrub-d B{ 0 0 0 } } { scrub-r B{ } } { gc-roots { } } }
}
[
V{
- T{ ##inc-d f 3 }
+ T{ ##inc f D 3 }
T{ ##save-context f 5 6 }
T{ ##box f 4 3 "from_signed_4" int-rep
T{ gc-map { scrub-d B{ 0 0 0 } } { scrub-r B{ } } { gc-roots { } } }
cpu.architecture kernel sequences ;
IN: compiler.cfg.save-contexts
-UNION: context-modifier ##phi ##inc-d ##inc-r ##callback-inputs ;
+UNION: context-modifier ##phi ##inc ##callback-inputs ;
UNION: context-save-needed gc-map-insn ;
: save-context-offset ( insns -- n )
V{
- T{ ##inc-d f -3 }
+ T{ ##inc f D -3 }
T{ ##peek f 12 D -2 }
T{ ##peek f 23 D -1 }
T{ ##sar-imm f 13 23 4 }
} 0 test-bb
V{
- T{ ##inc-d f 2 }
+ T{ ##inc f D 2 }
T{ ##peek f 32 D 2 }
T{ ##load-reference f 33 ##check-nursery-branch }
T{ ##load-integer f 34 11 }
} 2 test-bb
V{
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##slot-imm f 57 48 11 2 }
T{ ##compare f 58 33 57 cc= 20 }
T{ ##replace f 58 D 0 }
} 4 test-bb
V{
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##replace-imm f f D 0 }
T{ ##branch f }
} 5 test-bb
} 6 test-bb
V{
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##replace-imm f f D 0 }
T{ ##branch f }
} 7 test-bb
} 2 test-bb
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##load-reference f 37 T{ bab } }
T{ ##load-reference f 38 { gfg 1 1 tuple 57438726 gfg 7785907 } }
T{ ##allot f 40 12 tuple 4 }
} 4 test-bb
V{
- T{ ##inc-r f 1 }
- T{ ##inc-d f 1 }
+ T{ ##inc f R 1 }
+ T{ ##inc f D 1 }
T{ ##peek f 43 D 1 }
T{ ##peek f 44 D 2 }
T{ ##tagged>integer f 45 43 }
} 5 test-bb
V{
- T{ ##inc-d f -1 }
+ T{ ##inc f D 1 }
T{ ##slot-imm f 58 43 1 7 }
T{ ##slot-imm f 60 58 7 2 }
T{ ##compare-imm-branch f 60 bab cc= }
} 7 test-bb
V{
- T{ ##inc-r f -1 }
- T{ ##inc-d f -1 }
+ T{ ##inc f R -1 }
+ T{ ##inc f D -1 }
T{ ##set-slot-imm f 43 44 2 7 }
T{ ##write-barrier-imm f 44 2 7 34 35 }
T{ ##branch }
} 9 test-bb
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace f 44 R 0 }
T{ ##replace-imm f bab D 0 }
T{ ##branch }
} 12 test-bb
V{
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
T{ ##branch }
} 13 test-bb
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace f 44 R 0 }
T{ ##replace-imm f bab D 0 }
T{ ##branch }
} 0 test-bb
V{
- T{ ##inc-d f 1 }
+
+ T{ ##inc f D 1 }
T{ ##peek f 31 D 1 }
T{ ##sar-imm f 16 31 4 }
T{ ##load-integer f 17 0 }
} 3 test-bb
V{
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##branch f }
} 4 test-bb
ARTICLE: "compiler.cfg.stacks.clearing" "Uninitialized stack location clearing"
"A compiler pass that inserts " { $link ##replace-imm } " instructions front of unsafe " { $link ##peek } " instructions in the " { $link cfg } ". Consider the following sequence of instructions."
{ $code
- "##inc-d 2"
+ "##inc D 2"
"##peek RCX D 2"
}
"The ##peek can cause a stack underflow and then there will be two uninitialized locations on the data stack that can't be traced. To counteract that, this pass modifies the instruction sequence so that it becomes:"
{ $code
- "##inc-d 2"
+ "##inc D 2"
"##replace-imm 17 D 0"
"##replace-imm 17 D 1"
"##peek RCX D 2"
{
V{
- T{ ##inc-d { n 2 } { insn# 0 } }
+ T{ ##inc { loc D 2 } { insn# 0 } }
T{ ##replace-imm { src 17 } { loc T{ ds-loc } } }
T{ ##replace-imm { src 17 } { loc T{ ds-loc { n 1 } } } }
- T{ ##peek { loc T{ ds-loc { n 2 } } } { insn# 1 } }
+ T{ ##peek { loc D 2 } { insn# 1 } }
}
} [
- { T{ ##inc-d f 2 } T{ ##peek f f D 2 } } insns>cfg
+ { T{ ##inc f D 2 } T{ ##peek f f D 2 } } insns>cfg
dup clear-uninitialized cfg>insns
] unit-test
{ $example
"USING: compiler.cfg.stacks.local prettyprint ;"
"T{ current-height { emit-d 4 } { emit-r -2 } } height-changes ."
- "{ T{ ##inc-d { n 4 } } T{ ##inc-r { n -2 } } }"
+ "{ T{ ##inc { loc D 4 } } T{ ##inc { loc R -2 } } }"
}
} ;
-USING: accessors assocs biassocs combinators compiler.cfg.instructions
-compiler.cfg.registers compiler.cfg.stacks.local cpu.architecture kernel
+USING: accessors assocs biassocs combinators compiler.cfg
+compiler.cfg.instructions compiler.cfg.registers compiler.cfg.stacks
+compiler.cfg.stacks.local compiler.cfg.utilities cpu.architecture kernel
namespaces sequences tools.test ;
IN: compiler.cfg.stacks.local.tests
] unit-test
{
- { T{ ##inc-d { n 4 } } T{ ##inc-r { n -2 } } }
+ { T{ ##inc { loc D 4 } } T{ ##inc { loc R -2 } } }
} [
T{ current-height { emit-d 4 } { emit-r -2 } } height-changes
] unit-test
H{ } clone replace-mapping set 80
D 77 replace-loc D 77 peek-loc
] unit-test
+
+{ 0 } [
+ V{ } 0 insns>block basic-block set
+ begin-stack-analysis begin-local-analysis
+ compute-local-kill-set assoc-size
+] unit-test
[ [ loc>vreg ] dip ] assoc-map parallel-copy ;
: height-changes ( current-height -- insns )
- [ emit-d>> ] [ emit-r>> ] bi 2array
- { ##inc-d ##inc-r } [ new swap >>n ] 2map [ n>> 0 = not ] filter ;
+ [ emit-d>> <ds-loc> ] [ emit-r>> <rs-loc> ] bi 2array
+ [ n>> 0 = not ] filter [ ##inc new swap >>loc ] map ;
: emit-changes ( -- )
building get pop
current-height get height-changes %
, ;
-! inc-d/inc-r: these emit ##inc-d/##inc-r to change the stack height later
+! inc-d/inc-r: these emit ##inc to change the stack height later
: inc-d ( n -- )
current-height get
[ [ + ] change-emit-d drop ]
}
} [
{
- T{ ##inc-d f 2 }
+ T{ ##inc f D 2 }
T{ ##peek f f D 2 }
- T{ ##inc-d f 0 }
+ T{ ##inc f D 0 }
} insns>cfg trace-stack-state
] unit-test
{
{ { 1 { } } { 0 { } } }
-} [ V{ T{ ##inc-d f 1 } } following-stack-state ] unit-test
+} [ V{ T{ ##inc f D 1 } } following-stack-state ] unit-test
{
{ { 0 { } } { 1 { } } }
-} [ V{ T{ ##inc-r f 1 } } following-stack-state ] unit-test
+} [ V{ T{ ##inc f R 1 } } following-stack-state ] unit-test
! Here the peek refers to a parameter of the word.
{
}
} [
V{
- T{ ##inc-d f 3 }
+ T{ ##inc f D 3 }
T{ ##peek { loc D 3 } }
T{ ##branch }
}
V{
T{ ##replace { src 10 } { loc D 0 } }
T{ ##alien-invoke { gc-map T{ gc-map { scrub-d { } } } } }
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
T{ ##peek { loc D -1 } }
} following-stack-state
] unit-test
} [
V{
T{ ##replace { src 10 } { loc D 0 } }
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace { src 10 } { loc D 0 } }
} following-stack-state
] unit-test
} [
V{
T{ ##replace { src 10 } { loc D 0 } }
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace { src 10 } { loc D 0 } }
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
} following-stack-state
] unit-test
{ { 0 { -1 } } { 0 { } } }
} [
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace { src 10 } { loc D 0 } }
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
} following-stack-state
] unit-test
} [
V{
T{ ##replace { src 10 } { loc D 0 } }
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
T{ ##call }
} following-stack-state
] unit-test
! Should not be ok because the value wasn't initialized when gc ran.
[
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##alien-invoke { gc-map T{ gc-map { scrub-d { } } } } }
T{ ##peek { loc D 0 } }
} following-stack-state
[
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##peek { loc D 0 } }
} following-stack-state
] [ vacant-peek? ] must-fail-with
[
V{
- T{ ##inc-r f 1 }
+ T{ ##inc f R 1 }
T{ ##peek { loc R 0 } }
} following-stack-state
] [ vacant-peek? ] must-fail-with
: cfg1 ( -- cfg )
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace { src 10 } { loc D 0 } }
} 0 insns>block
V{
T{ ##peek { dst 37 } { loc D 0 } }
- T{ ##inc-d f -1 }
+ T{ ##inc f D -1 }
} 1 insns>block
1vector >>successors block>cfg ;
{ 0 V{ T{ ##safepoint } T{ ##prologue } T{ ##branch } } }
{
1 V{
- T{ ##inc-d f 2 }
+ T{ ##inc f D 2 }
T{ ##replace { src 0 } { loc D 1 } }
T{ ##replace { src 0 } { loc D 0 } }
}
}
{
3 V{
- T{ ##inc-d f 2 }
+ T{ ##inc f D 2 }
T{ ##peek { dst 0 } { loc D 2 } }
T{ ##peek { dst 0 } { loc D 3 } }
T{ ##replace { src 0 } { loc D 2 } }
}
{
8 V{
- T{ ##inc-d f 3 }
+ T{ ##inc f D 3 }
T{ ##peek { dst 0 } { loc D 5 } }
T{ ##replace { src 0 } { loc D 0 } }
T{ ##replace { src 0 } { loc D 3 } }
}
{
10 V{
- T{ ##inc-d f -3 }
+ T{ ##inc f D -3 }
T{ ##peek { dst 0 } { loc D -3 } }
T{ ##alien-invoke { gc-map T{ gc-map { scrub-d { } } } } }
}
GENERIC: visit-insn ( state insn -- state' )
-M: ##inc-d visit-insn ( state insn -- state' )
- n>> swap first2 [ adjust-stack ] dip 2array ;
-
-M: ##inc-r visit-insn ( state insn -- state' )
- n>> swap first2 swapd adjust-stack 2array ;
+M: ##inc visit-insn ( state insn -- state' )
+ [ first2 ] dip insn>location
+ [ rot adjust-stack swap ] [ swap adjust-stack ] if 2array ;
M: ##replace-imm visit-insn mark-location ;
M: ##replace visit-insn mark-location ;
ARTICLE: "compiler.cfg.stacks.vacant" "Uninitialized/overinitialized stack location analysis"
"Consider the following sequence of instructions:"
{ $code
- "##inc-d 2"
+ "##inc D 2"
"..."
"##allot"
"##replace ... D 0"
CODEGEN: ##peek %peek
CODEGEN: ##replace %replace
CODEGEN: ##replace-imm %replace-imm
-CODEGEN: ##inc-d %inc-d
-CODEGEN: ##inc-r %inc-r
+CODEGEN: ##inc %inc
CODEGEN: ##call %call
CODEGEN: ##jump %jump
CODEGEN: ##return %return
: compile-test-bb ( insns -- result )
V{ T{ ##prologue } T{ ##branch } } [ clone ] map 0 test-bb
V{
- T{ ##inc-d f 1 }
+ T{ ##inc f D 1 }
T{ ##replace f 0 D 0 }
T{ ##branch }
} [ clone ] map append 1 test-bb
HOOK: %peek cpu ( vreg loc -- )
HOOK: %replace cpu ( vreg loc -- )
HOOK: %replace-imm cpu ( src loc -- )
-HOOK: %inc-d cpu ( n -- )
-HOOK: %inc-r cpu ( n -- )
+HOOK: %inc cpu ( loc -- )
HOOK: stack-frame-size cpu ( stack-frame -- n )
HOOK: %call cpu ( word -- )
} cond
scratch-reg reg offset %store-cell ;
-! Increment data stack pointer by n cells.
-M: ppc %inc-d ( n -- )
- [ ds-reg ds-reg ] dip cells ADDI ;
-
-! Increment retain stack pointer by n cells.
-M: ppc %inc-r ( n -- )
- [ rs-reg rs-reg ] dip cells ADDI ;
+! Increment stack pointer by n cells.
+M: ppc %inc ( loc -- )
+ [ ds-loc? [ ds-reg ds-reg ] [ rs-reg rs-reg ] if ] [ n>> ] bi cells ADDI ;
M: ppc stack-frame-size ( stack-frame -- i )
(stack-frame-size)
-USING: alien alien.c-types cpu.architecture cpu.x86.64
-cpu.x86.assembler cpu.x86.assembler.operands tools.test
-assocs sequences ;
+USING: alien alien.c-types assocs compiler.cfg.registers
+cpu.architecture cpu.x86.64 cpu.x86.assembler cpu.x86.assembler.operands make
+sequences tools.test ;
IN: cpu.x86.64.tests
: assembly-test-1 ( -- x ) int { } cdecl [ RAX 3 MOV ] alien-assembly ;
] alien-assembly ;
[ 23 ] [ 17 6 assembly-test-2 ] unit-test
+
+{ B{ 73 131 198 24 } } [
+ [ T{ ds-loc { n 3 } } %inc ] B{ } make
+] unit-test
} cond ;
: (%inc) ( n reg -- ) swap cells dup 0 > [ ADD ] [ neg SUB ] if ; inline
-M: x86 %inc-d ( n -- ) ds-reg (%inc) ;
-M: x86 %inc-r ( n -- ) rs-reg (%inc) ;
+
+M: x86 %inc ( loc -- )
+ [ n>> ] [ ds-loc? ds-reg rs-reg ? ] bi (%inc) ;
M: x86 %call ( word -- ) 0 CALL rc-relative rel-word-pic ;
V{ T{ ##branch } } 0 test-bb
V{
- T{ ##inc-d { n -1 } }
+ T{ ##inc { loc D -1 } }
T{ ##peek { dst 1 } { loc D -1 } }
T{ ##compare-imm-branch { src1 1 } { src2 f } { cc cc/= } }
} 1 test-bb
V{
- T{ ##inc-d { n 1 } }
+ T{ ##inc { loc D 1 } }
T{ ##load-integer { dst 2 } { val 100 } }
T{ ##branch }
} 2 test-bb
V{
- T{ ##inc-d { n 1 } }
+ T{ ##inc { loc D 1 } }
T{ ##load-integer { dst 3 } { val 200 } }
T{ ##branch }
} 3 test-bb
V{ T{ ##prologue } T{ ##branch } } 0 test-bb
V{
- T{ ##inc-d f 3 }
+ T{ ##inc f D 3 }
T{ ##load-integer f 21 0 }
T{ ##load-integer f 22 100 }
T{ ##load-integer f 23 0 }
} 2 test-bb
V{
- T{ ##inc-d f -2 }
+ T{ ##inc f D -2 }
T{ ##replace f 29 D 0 }
T{ ##branch }
} 4 test-bb