mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-14 23:04:57 +00:00
Added fast 16bit unsigned multiplication.
This commit is contained in:
parent
17cb00955c
commit
e9892219b6
8
src/main/fragment/vduz1=_deref_pduc1.asm
Normal file
8
src/main/fragment/vduz1=_deref_pduc1.asm
Normal file
@ -0,0 +1,8 @@
|
||||
lda {c1}
|
||||
sta {z1}
|
||||
lda {c1}+1
|
||||
sta {z1}+1
|
||||
lda {c1}+2
|
||||
sta {z1}+2
|
||||
lda {c1}+3
|
||||
sta {z1}+3
|
@ -321,6 +321,10 @@ public class AsmFragmentInstanceSpec {
|
||||
return "pwu";
|
||||
} else if(SymbolType.isSWord(elementType)) {
|
||||
return "pws";
|
||||
} else if(SymbolType.isDWord(elementType)) {
|
||||
return "pdu";
|
||||
} else if(SymbolType.isSDWord(elementType)) {
|
||||
return "pds";
|
||||
} else if(SymbolType.BOOLEAN.equals(elementType)) {
|
||||
return "pbo";
|
||||
} else if(elementType instanceof SymbolTypeProcedure) {
|
||||
|
@ -88,3 +88,86 @@ signed word mulf8s(signed byte a, signed byte b) {
|
||||
}
|
||||
return (signed word)m;
|
||||
}
|
||||
|
||||
// Fast multiply two unsigned words to a double word result
|
||||
// Done in assembler to utilize fast addition A+X
|
||||
dword mulf16u(word a, word b) {
|
||||
const word* memA = $f8;
|
||||
const word* memB = $fa;
|
||||
const dword* memR = $fc;
|
||||
*memA = a;
|
||||
*memB = b;
|
||||
asm {
|
||||
lda memA
|
||||
sta sm1a+1
|
||||
sta sm3a+1
|
||||
sta sm5a+1
|
||||
sta sm7a+1
|
||||
eor #$ff
|
||||
sta sm2a+1
|
||||
sta sm4a+1
|
||||
sta sm6a+1
|
||||
sta sm8a+1
|
||||
lda memA+1
|
||||
sta sm1b+1
|
||||
sta sm3b+1
|
||||
sta sm5b+1
|
||||
sta sm7b+1
|
||||
eor #$ff
|
||||
sta sm2b+1
|
||||
sta sm4b+1
|
||||
sta sm6b+1
|
||||
sta sm8b+1
|
||||
ldx memB
|
||||
sec
|
||||
sm1a: lda mulf_sqr1_lo,x
|
||||
sm2a: sbc mulf_sqr2_lo,x
|
||||
sta memR+0
|
||||
sm3a: lda mulf_sqr1_hi,x
|
||||
sm4a: sbc mulf_sqr2_hi,x
|
||||
sta _AA+1
|
||||
sec
|
||||
sm1b: lda mulf_sqr1_lo,x
|
||||
sm2b: sbc mulf_sqr2_lo,x
|
||||
sta _cc+1
|
||||
sm3b: lda mulf_sqr1_hi,x
|
||||
sm4b: sbc mulf_sqr2_hi,x
|
||||
sta _CC+1
|
||||
ldx memB+1
|
||||
sec
|
||||
sm5a: lda mulf_sqr1_lo,x
|
||||
sm6a: sbc mulf_sqr2_lo,x
|
||||
sta _bb+1
|
||||
sm7a: lda mulf_sqr1_hi,x
|
||||
sm8a: sbc mulf_sqr2_hi,x
|
||||
sta _BB+1
|
||||
sec
|
||||
sm5b: lda mulf_sqr1_lo,x
|
||||
sm6b: sbc mulf_sqr2_lo,x
|
||||
sta _dd+1
|
||||
sm7b: lda mulf_sqr1_hi,x
|
||||
sm8b: sbc mulf_sqr2_hi,x
|
||||
sta memR+3
|
||||
clc
|
||||
_AA: lda #0
|
||||
_bb: adc #0
|
||||
sta memR+1
|
||||
_BB: lda #0
|
||||
_CC: adc #0
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
clc
|
||||
!:
|
||||
_cc: lda #0
|
||||
adc memR+1
|
||||
sta memR+1
|
||||
_dd: lda #0
|
||||
adc memR+2
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
!:
|
||||
}
|
||||
return *memR;
|
||||
}
|
||||
|
@ -44,6 +44,11 @@ public class TestPrograms {
|
||||
AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMinFastMul16() throws IOException, URISyntaxException {
|
||||
compileAndCompare("min-fmul-16");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBitwiseNot() throws IOException, URISyntaxException {
|
||||
compileAndCompare("bitwise-not");
|
||||
|
151
src/test/kc/min-fmul-16.kc
Normal file
151
src/test/kc/min-fmul-16.kc
Normal file
@ -0,0 +1,151 @@
|
||||
import "print"
|
||||
|
||||
byte* RASTER = $d012;
|
||||
byte* BORDERCOL = $d020;
|
||||
byte* SCREEN = $400;
|
||||
|
||||
void main() {
|
||||
mulf_init();
|
||||
word a = 1234;
|
||||
word b = 2345;
|
||||
asm { sei }
|
||||
while(true) {
|
||||
while(*RASTER!=$ff) {}
|
||||
(*BORDERCOL)++;
|
||||
dword r = mulf16u(a, b);
|
||||
(*BORDERCOL)--;
|
||||
print_dword(r);
|
||||
print_set_screen(SCREEN);
|
||||
}
|
||||
}
|
||||
|
||||
// Library Implementation of the Seriously Fast Multiplication
|
||||
// See http://codebase64.org/doku.php?id=base:seriously_fast_multiplication
|
||||
// Utilizes the fact that a*b = ((a+b)/2)^2 - ((a-b)/2)^2
|
||||
|
||||
// mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255).
|
||||
// <f(x) = <(( x * x )/4)
|
||||
byte[512] align($100) mulf_sqr1_lo;
|
||||
// >f(x) = >(( x * x )/4)
|
||||
byte[512] align($100) mulf_sqr1_hi;
|
||||
// <g(x) = <((( x - 255) * ( x - 255 ))/4)
|
||||
byte[512] align($100) mulf_sqr2_lo;
|
||||
// >g(x) = >((( x - 255) * ( x - 255 ))/4)
|
||||
byte[512] align($100) mulf_sqr2_hi;
|
||||
|
||||
// Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4)
|
||||
void mulf_init() {
|
||||
// Fill mulf_sqr1 = f(x) = int(x*x/4): If f(x) = x*x/4 then f(x+1) = f(x) + x/2 + 1/4
|
||||
word sqr = 0; // sqr = (x*x)/4
|
||||
byte x_2 = 0; // x/2
|
||||
byte c = 0; // Counter used for determining x%2==0
|
||||
byte* sqr1_hi = mulf_sqr1_hi+1;
|
||||
for(byte* sqr1_lo = mulf_sqr1_lo+1; sqr1_lo!=mulf_sqr1_lo+512; sqr1_lo++) {
|
||||
if((++c&1)==0) {
|
||||
x_2++; // increase i/2 on even numbers
|
||||
sqr++; // sqr++ on even numbers because 1 = 2*1/4 (from the two previous numbers) + 1/2 (half of the previous uneven number)
|
||||
}
|
||||
*sqr1_lo = <sqr;
|
||||
*sqr1_hi++ = >sqr;
|
||||
sqr = sqr + x_2; // sqr = sqr + i/2 (when uneven the 1/2 is not added here - see above)
|
||||
}
|
||||
// Fill mulf_sqr2 = g(x) = f(x-255) : If x-255<0 then g(x)=f(255-x) (because x*x = -x*-x)
|
||||
// g(0) = f(255), g(1) = f(254), ..., g(254) = f(1), g(255) = f(0), g(256) = f(1), ..., g(510) = f(255), g(511) = f(256)
|
||||
byte x_255 = (byte)-1; //Start with g(0)=f(255)
|
||||
byte dir = $ff; // Decrease or increase x_255 - initially we decrease
|
||||
byte* sqr2_hi = mulf_sqr2_hi;
|
||||
for(byte* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) {
|
||||
*sqr2_lo = mulf_sqr1_lo[x_255];
|
||||
*sqr2_hi++ = mulf_sqr1_hi[x_255];
|
||||
x_255 = x_255 + dir;
|
||||
if(x_255==0) {
|
||||
dir = 1; // when x_255=0 then start counting up
|
||||
}
|
||||
}
|
||||
// Set the very last value g(511) = f(256)
|
||||
*(mulf_sqr2_lo+511) = *(mulf_sqr1_lo+256);
|
||||
*(mulf_sqr2_hi+511) = *(mulf_sqr1_hi+256);
|
||||
}
|
||||
|
||||
// Fast multiply two unsigned words to a double word result
|
||||
// Done in assembler to utilize fast addition A+X
|
||||
dword mulf16u(word a, word b) {
|
||||
const word* memA = $f8;
|
||||
const word* memB = $fa;
|
||||
const dword* memR = $fc;
|
||||
*memA = a;
|
||||
*memB = b;
|
||||
asm {
|
||||
lda memA
|
||||
sta sm1a+1
|
||||
sta sm3a+1
|
||||
sta sm5a+1
|
||||
sta sm7a+1
|
||||
eor #$ff
|
||||
sta sm2a+1
|
||||
sta sm4a+1
|
||||
sta sm6a+1
|
||||
sta sm8a+1
|
||||
lda memA+1
|
||||
sta sm1b+1
|
||||
sta sm3b+1
|
||||
sta sm5b+1
|
||||
sta sm7b+1
|
||||
eor #$ff
|
||||
sta sm2b+1
|
||||
sta sm4b+1
|
||||
sta sm6b+1
|
||||
sta sm8b+1
|
||||
ldx memB
|
||||
sec
|
||||
sm1a: lda mulf_sqr1_lo,x
|
||||
sm2a: sbc mulf_sqr2_lo,x
|
||||
sta memR+0
|
||||
sm3a: lda mulf_sqr1_hi,x
|
||||
sm4a: sbc mulf_sqr2_hi,x
|
||||
sta _AA+1
|
||||
sec
|
||||
sm1b: lda mulf_sqr1_lo,x
|
||||
sm2b: sbc mulf_sqr2_lo,x
|
||||
sta _cc+1
|
||||
sm3b: lda mulf_sqr1_hi,x
|
||||
sm4b: sbc mulf_sqr2_hi,x
|
||||
sta _CC+1
|
||||
ldx memB+1
|
||||
sec
|
||||
sm5a: lda mulf_sqr1_lo,x
|
||||
sm6a: sbc mulf_sqr2_lo,x
|
||||
sta _bb+1
|
||||
sm7a: lda mulf_sqr1_hi,x
|
||||
sm8a: sbc mulf_sqr2_hi,x
|
||||
sta _BB+1
|
||||
sec
|
||||
sm5b: lda mulf_sqr1_lo,x
|
||||
sm6b: sbc mulf_sqr2_lo,x
|
||||
sta _dd+1
|
||||
sm7b: lda mulf_sqr1_hi,x
|
||||
sm8b: sbc mulf_sqr2_hi,x
|
||||
sta memR+3
|
||||
clc
|
||||
_AA: lda #0
|
||||
_bb: adc #0
|
||||
sta memR+1
|
||||
_BB: lda #0
|
||||
_CC: adc #0
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
clc
|
||||
!:
|
||||
_cc: lda #0
|
||||
adc memR+1
|
||||
sta memR+1
|
||||
_dd: lda #0
|
||||
adc memR+2
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
!:
|
||||
}
|
||||
return *memR;
|
||||
}
|
@ -46,28 +46,34 @@ void mul16u_compare() {
|
||||
word a = 0;
|
||||
word b = 0;
|
||||
for(byte i: 0..15) {
|
||||
print_str(".@");
|
||||
for(byte j: 0..15) {
|
||||
a=a+3371;
|
||||
b=b+4093;
|
||||
dword ms = muls16u(a, b);
|
||||
dword mn = mul16u(a,b);
|
||||
dword mf = mulf16u(a,b);
|
||||
byte ok = 1;
|
||||
if(ms!=mf) {
|
||||
ok = 0;
|
||||
}
|
||||
if(ms!=mn) {
|
||||
ok = 0;
|
||||
}
|
||||
if(ok==0) {
|
||||
*BGCOL = 2;
|
||||
mul16u_error(a,b, ms, mn);
|
||||
mul16u_error(a,b, ms, mn, mf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
print_ln();
|
||||
print_str("word multiply results match!@");
|
||||
print_ln();
|
||||
}
|
||||
|
||||
void mul16u_error(word a, word b, dword ms, dword mn) {
|
||||
print_str("word multiply mismatch @");
|
||||
void mul16u_error(word a, word b, dword ms, dword mn, dword mf) {
|
||||
print_str("multiply mismatch @");
|
||||
print_word(a);
|
||||
print_str("*@");
|
||||
print_word(b);
|
||||
@ -75,6 +81,8 @@ void mul16u_error(word a, word b, dword ms, dword mn) {
|
||||
print_dword(ms);
|
||||
print_str(" / normal:@");
|
||||
print_dword(mn);
|
||||
print_str(" / fast:@");
|
||||
print_dword(mf);
|
||||
print_ln();
|
||||
}
|
||||
|
||||
@ -83,6 +91,7 @@ void mul16s_compare() {
|
||||
signed word a = -$7fff;
|
||||
signed word b = -$7fff;
|
||||
for(byte i: 0..15) {
|
||||
print_str(".@");
|
||||
for(byte j: 0..15) {
|
||||
a=a+3371;
|
||||
b=b+4093;
|
||||
@ -99,6 +108,7 @@ void mul16s_compare() {
|
||||
}
|
||||
}
|
||||
}
|
||||
print_ln();
|
||||
print_str("signed word multiply results match!@");
|
||||
print_ln();
|
||||
}
|
||||
|
315
src/test/ref/min-fmul-16.asm
Normal file
315
src/test/ref/min-fmul-16.asm
Normal file
@ -0,0 +1,315 @@
|
||||
.pc = $801 "Basic"
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label RASTER = $d012
|
||||
.label BORDERCOL = $d020
|
||||
.label SCREEN = $400
|
||||
.label print_char_cursor = 4
|
||||
jsr main
|
||||
main: {
|
||||
.label a = $4d2
|
||||
.label b = $929
|
||||
.label r = 9
|
||||
jsr mulf_init
|
||||
sei
|
||||
lda #<$400
|
||||
sta print_char_cursor
|
||||
lda #>$400
|
||||
sta print_char_cursor+1
|
||||
b4:
|
||||
lda RASTER
|
||||
cmp #$ff
|
||||
bne b4
|
||||
inc BORDERCOL
|
||||
jsr mulf16u
|
||||
dec BORDERCOL
|
||||
jsr print_dword
|
||||
jsr print_set_screen
|
||||
lda #<SCREEN
|
||||
sta print_char_cursor
|
||||
lda #>SCREEN
|
||||
sta print_char_cursor+1
|
||||
jmp b4
|
||||
}
|
||||
print_set_screen: {
|
||||
rts
|
||||
}
|
||||
print_dword: {
|
||||
.label dw = 9
|
||||
lda dw+2
|
||||
sta print_word.w
|
||||
lda dw+3
|
||||
sta print_word.w+1
|
||||
jsr print_word
|
||||
lda dw
|
||||
sta print_word.w
|
||||
lda dw+1
|
||||
sta print_word.w+1
|
||||
jsr print_word
|
||||
rts
|
||||
}
|
||||
print_word: {
|
||||
.label w = 2
|
||||
lda w+1
|
||||
tax
|
||||
jsr print_byte
|
||||
lda w
|
||||
tax
|
||||
jsr print_byte
|
||||
rts
|
||||
}
|
||||
print_byte: {
|
||||
txa
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda print_hextab,y
|
||||
jsr print_char
|
||||
txa
|
||||
and #$f
|
||||
tay
|
||||
lda print_hextab,y
|
||||
jsr print_char
|
||||
rts
|
||||
}
|
||||
print_char: {
|
||||
ldy #0
|
||||
sta (print_char_cursor),y
|
||||
inc print_char_cursor
|
||||
bne !+
|
||||
inc print_char_cursor+1
|
||||
!:
|
||||
rts
|
||||
}
|
||||
mulf16u: {
|
||||
.label memA = $f8
|
||||
.label memB = $fa
|
||||
.label memR = $fc
|
||||
.label return = 9
|
||||
lda #<main.a
|
||||
sta memA
|
||||
lda #>main.a
|
||||
sta memA+1
|
||||
lda #<main.b
|
||||
sta memB
|
||||
lda #>main.b
|
||||
sta memB+1
|
||||
lda memA
|
||||
sta sm1a+1
|
||||
sta sm3a+1
|
||||
sta sm5a+1
|
||||
sta sm7a+1
|
||||
eor #$ff
|
||||
sta sm2a+1
|
||||
sta sm4a+1
|
||||
sta sm6a+1
|
||||
sta sm8a+1
|
||||
lda memA+1
|
||||
sta sm1b+1
|
||||
sta sm3b+1
|
||||
sta sm5b+1
|
||||
sta sm7b+1
|
||||
eor #$ff
|
||||
sta sm2b+1
|
||||
sta sm4b+1
|
||||
sta sm6b+1
|
||||
sta sm8b+1
|
||||
ldx memB
|
||||
sec
|
||||
sm1a:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm2a:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta memR+0
|
||||
sm3a:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm4a:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _AA+1
|
||||
sec
|
||||
sm1b:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm2b:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _cc+1
|
||||
sm3b:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm4b:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _CC+1
|
||||
ldx memB+1
|
||||
sec
|
||||
sm5a:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm6a:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _bb+1
|
||||
sm7a:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm8a:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _BB+1
|
||||
sec
|
||||
sm5b:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm6b:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _dd+1
|
||||
sm7b:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm8b:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta memR+3
|
||||
clc
|
||||
_AA:
|
||||
lda #0
|
||||
_bb:
|
||||
adc #0
|
||||
sta memR+1
|
||||
_BB:
|
||||
lda #0
|
||||
_CC:
|
||||
adc #0
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
clc
|
||||
!:
|
||||
_cc:
|
||||
lda #0
|
||||
adc memR+1
|
||||
sta memR+1
|
||||
_dd:
|
||||
lda #0
|
||||
adc memR+2
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
!:
|
||||
lda memR
|
||||
sta return
|
||||
lda memR+1
|
||||
sta return+1
|
||||
lda memR+2
|
||||
sta return+2
|
||||
lda memR+3
|
||||
sta return+3
|
||||
rts
|
||||
}
|
||||
mulf_init: {
|
||||
.label sqr1_hi = 4
|
||||
.label sqr = 7
|
||||
.label sqr1_lo = 2
|
||||
.label x_2 = 6
|
||||
.label sqr2_hi = 4
|
||||
.label sqr2_lo = 2
|
||||
.label dir = 6
|
||||
lda #0
|
||||
sta x_2
|
||||
lda #<mulf_sqr1_hi+1
|
||||
sta sqr1_hi
|
||||
lda #>mulf_sqr1_hi+1
|
||||
sta sqr1_hi+1
|
||||
lda #<mulf_sqr1_lo+1
|
||||
sta sqr1_lo
|
||||
lda #>mulf_sqr1_lo+1
|
||||
sta sqr1_lo+1
|
||||
lda #<0
|
||||
sta sqr
|
||||
sta sqr+1
|
||||
tax
|
||||
b1:
|
||||
inx
|
||||
txa
|
||||
and #1
|
||||
cmp #0
|
||||
bne b2
|
||||
inc x_2
|
||||
inc sqr
|
||||
bne !+
|
||||
inc sqr+1
|
||||
!:
|
||||
b2:
|
||||
lda sqr
|
||||
ldy #0
|
||||
sta (sqr1_lo),y
|
||||
lda sqr+1
|
||||
sta (sqr1_hi),y
|
||||
inc sqr1_hi
|
||||
bne !+
|
||||
inc sqr1_hi+1
|
||||
!:
|
||||
lda x_2
|
||||
clc
|
||||
adc sqr
|
||||
sta sqr
|
||||
lda #0
|
||||
adc sqr+1
|
||||
sta sqr+1
|
||||
inc sqr1_lo
|
||||
bne !+
|
||||
inc sqr1_lo+1
|
||||
!:
|
||||
lda sqr1_lo+1
|
||||
cmp #>mulf_sqr1_lo+$200
|
||||
bne b1
|
||||
lda sqr1_lo
|
||||
cmp #<mulf_sqr1_lo+$200
|
||||
bne b1
|
||||
lda #$ff
|
||||
sta dir
|
||||
lda #<mulf_sqr2_hi
|
||||
sta sqr2_hi
|
||||
lda #>mulf_sqr2_hi
|
||||
sta sqr2_hi+1
|
||||
lda #<mulf_sqr2_lo
|
||||
sta sqr2_lo
|
||||
lda #>mulf_sqr2_lo
|
||||
sta sqr2_lo+1
|
||||
ldx #-1
|
||||
b3:
|
||||
lda mulf_sqr1_lo,x
|
||||
ldy #0
|
||||
sta (sqr2_lo),y
|
||||
lda mulf_sqr1_hi,x
|
||||
sta (sqr2_hi),y
|
||||
inc sqr2_hi
|
||||
bne !+
|
||||
inc sqr2_hi+1
|
||||
!:
|
||||
txa
|
||||
clc
|
||||
adc dir
|
||||
tax
|
||||
cpx #0
|
||||
bne b4
|
||||
lda #1
|
||||
sta dir
|
||||
b4:
|
||||
inc sqr2_lo
|
||||
bne !+
|
||||
inc sqr2_lo+1
|
||||
!:
|
||||
lda sqr2_lo+1
|
||||
cmp #>mulf_sqr2_lo+$1ff
|
||||
bne b3
|
||||
lda sqr2_lo
|
||||
cmp #<mulf_sqr2_lo+$1ff
|
||||
bne b3
|
||||
lda mulf_sqr1_lo+$100
|
||||
sta mulf_sqr2_lo+$1ff
|
||||
lda mulf_sqr1_hi+$100
|
||||
sta mulf_sqr2_hi+$1ff
|
||||
rts
|
||||
}
|
||||
print_hextab: .text "0123456789abcdef"
|
||||
.align $100
|
||||
mulf_sqr1_lo: .fill $200, 0
|
||||
.align $100
|
||||
mulf_sqr1_hi: .fill $200, 0
|
||||
.align $100
|
||||
mulf_sqr2_lo: .fill $200, 0
|
||||
.align $100
|
||||
mulf_sqr2_hi: .fill $200, 0
|
155
src/test/ref/min-fmul-16.cfg
Normal file
155
src/test/ref/min-fmul-16.cfg
Normal file
@ -0,0 +1,155 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@17
|
||||
@17: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @17
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @17
|
||||
[4] phi() [ ] ( main:2 [ ] )
|
||||
[5] call mulf_init [ ] ( main:2 [ ] )
|
||||
to:main::@13
|
||||
main::@13: scope:[main] from main
|
||||
asm { sei }
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@13 main::@15
|
||||
[7] (byte*) print_char_cursor#16 ← phi( main::@13/((byte*))(word/signed word/dword/signed dword) 1024 main::@15/(const byte*) SCREEN#0 ) [ print_char_cursor#16 ] ( main:2 [ print_char_cursor#16 ] )
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@1 main::@4
|
||||
[8] if(*((const byte*) RASTER#0)!=(byte/word/signed word/dword/signed dword) 255) goto main::@4 [ print_char_cursor#16 ] ( main:2 [ print_char_cursor#16 ] )
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@4
|
||||
[9] *((const byte*) BORDERCOL#0) ← ++ *((const byte*) BORDERCOL#0) [ print_char_cursor#16 ] ( main:2 [ print_char_cursor#16 ] )
|
||||
[10] call mulf16u [ print_char_cursor#16 mulf16u::return#1 ] ( main:2 [ print_char_cursor#16 mulf16u::return#1 ] )
|
||||
[11] (dword) mulf16u::return#0 ← (dword) mulf16u::return#1 [ print_char_cursor#16 mulf16u::return#0 ] ( main:2 [ print_char_cursor#16 mulf16u::return#0 ] )
|
||||
to:main::@14
|
||||
main::@14: scope:[main] from main::@6
|
||||
[12] (dword) main::r#0 ← (dword) mulf16u::return#0 [ print_char_cursor#16 main::r#0 ] ( main:2 [ print_char_cursor#16 main::r#0 ] )
|
||||
[13] *((const byte*) BORDERCOL#0) ← -- *((const byte*) BORDERCOL#0) [ print_char_cursor#16 main::r#0 ] ( main:2 [ print_char_cursor#16 main::r#0 ] )
|
||||
[14] (dword) print_dword::dw#0 ← (dword) main::r#0 [ print_char_cursor#16 print_dword::dw#0 ] ( main:2 [ print_char_cursor#16 print_dword::dw#0 ] )
|
||||
[15] call print_dword [ ] ( main:2 [ ] )
|
||||
to:main::@15
|
||||
main::@15: scope:[main] from main::@14
|
||||
[16] phi() [ ] ( main:2 [ ] )
|
||||
[17] call print_set_screen [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
print_set_screen: scope:[print_set_screen] from main::@15
|
||||
[18] phi() [ ] ( main:2::print_set_screen:17 [ ] )
|
||||
to:print_set_screen::@return
|
||||
print_set_screen::@return: scope:[print_set_screen] from print_set_screen
|
||||
[19] return [ ] ( main:2::print_set_screen:17 [ ] )
|
||||
to:@return
|
||||
print_dword: scope:[print_dword] from main::@14
|
||||
[20] (word) print_word::w#0 ← > (dword) print_dword::dw#0 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] ( main:2::print_dword:15 [ print_char_cursor#16 print_dword::dw#0 print_word::w#0 ] )
|
||||
[21] call print_word [ print_dword::dw#0 print_char_cursor#10 ] ( main:2::print_dword:15 [ print_dword::dw#0 print_char_cursor#10 ] )
|
||||
to:print_dword::@1
|
||||
print_dword::@1: scope:[print_dword] from print_dword
|
||||
[22] (word) print_word::w#1 ← < (dword) print_dword::dw#0 [ print_word::w#1 print_char_cursor#10 ] ( main:2::print_dword:15 [ print_word::w#1 print_char_cursor#10 ] )
|
||||
[23] call print_word [ ] ( main:2::print_dword:15 [ ] )
|
||||
to:print_dword::@return
|
||||
print_dword::@return: scope:[print_dword] from print_dword::@1
|
||||
[24] return [ ] ( main:2::print_dword:15 [ ] )
|
||||
to:@return
|
||||
print_word: scope:[print_word] from print_dword print_dword::@1
|
||||
[25] (byte*) print_char_cursor#34 ← phi( print_dword/(byte*) print_char_cursor#16 print_dword::@1/(byte*) print_char_cursor#10 ) [ print_word::w#2 print_char_cursor#34 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#34 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#34 ] )
|
||||
[25] (word) print_word::w#2 ← phi( print_dword/(word) print_word::w#0 print_dword::@1/(word) print_word::w#1 ) [ print_word::w#2 print_char_cursor#34 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#34 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#34 ] )
|
||||
[26] (byte) print_byte::b#0 ← > (word) print_word::w#2 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#34 print_byte::b#0 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#34 print_byte::b#0 ] )
|
||||
[27] call print_byte [ print_word::w#2 print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23 [ print_word::w#2 print_char_cursor#10 ] )
|
||||
to:print_word::@1
|
||||
print_word::@1: scope:[print_word] from print_word
|
||||
[28] (byte) print_byte::b#1 ← < (word) print_word::w#2 [ print_char_cursor#10 print_byte::b#1 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_char_cursor#10 print_byte::b#1 ] main:2::print_dword:15::print_word:23 [ print_char_cursor#10 print_byte::b#1 ] )
|
||||
[29] call print_byte [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23 [ print_char_cursor#10 ] )
|
||||
to:print_word::@return
|
||||
print_word::@return: scope:[print_word] from print_word::@1
|
||||
[30] return [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23 [ print_char_cursor#10 ] )
|
||||
to:@return
|
||||
print_byte: scope:[print_byte] from print_word print_word::@1
|
||||
[31] (byte*) print_char_cursor#36 ← phi( print_word/(byte*) print_char_cursor#34 print_word::@1/(byte*) print_char_cursor#10 ) [ print_byte::b#2 print_char_cursor#36 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 ] )
|
||||
[31] (byte) print_byte::b#2 ← phi( print_word/(byte) print_byte::b#0 print_word::@1/(byte) print_byte::b#1 ) [ print_byte::b#2 print_char_cursor#36 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 ] )
|
||||
[32] (byte~) print_byte::$0 ← (byte) print_byte::b#2 >> (byte/signed byte/word/signed word/dword/signed dword) 4 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 print_byte::$0 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 print_byte::$0 ] )
|
||||
[33] (byte) print_char::ch#0 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0) [ print_byte::b#2 print_char_cursor#36 print_char::ch#0 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#36 print_char::ch#0 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_byte::b#2 print_char_cursor#36 print_char::ch#0 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#36 print_char::ch#0 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_byte::b#2 print_char_cursor#36 print_char::ch#0 ] )
|
||||
[34] call print_char [ print_char_cursor#10 print_byte::b#2 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 print_byte::b#2 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 print_byte::b#2 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 print_byte::b#2 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 print_byte::b#2 ] )
|
||||
to:print_byte::@1
|
||||
print_byte::@1: scope:[print_byte] from print_byte
|
||||
[35] (byte~) print_byte::$2 ← (byte) print_byte::b#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ print_char_cursor#10 print_byte::$2 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 print_byte::$2 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 print_byte::$2 ] )
|
||||
[36] (byte) print_char::ch#1 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2) [ print_char_cursor#10 print_char::ch#1 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 print_char::ch#1 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 print_char::ch#1 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 print_char::ch#1 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 print_char::ch#1 ] )
|
||||
[37] call print_char [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 ] )
|
||||
to:print_byte::@return
|
||||
print_byte::@return: scope:[print_byte] from print_byte::@1
|
||||
[38] return [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21::print_byte:27 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27 [ print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29 [ print_char_cursor#10 ] )
|
||||
to:@return
|
||||
print_char: scope:[print_char] from print_byte print_byte::@1
|
||||
[39] (byte*) print_char_cursor#27 ← phi( print_byte/(byte*) print_char_cursor#36 print_byte::@1/(byte*) print_char_cursor#10 ) [ print_char::ch#2 print_char_cursor#27 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char::ch#2 print_char_cursor#27 ] )
|
||||
[39] (byte) print_char::ch#2 ← phi( print_byte/(byte) print_char::ch#0 print_byte::@1/(byte) print_char::ch#1 ) [ print_char::ch#2 print_char_cursor#27 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char::ch#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char::ch#2 print_char_cursor#27 ] )
|
||||
[40] *((byte*) print_char_cursor#27) ← (byte) print_char::ch#2 [ print_char_cursor#27 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char_cursor#27 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char_cursor#27 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char_cursor#27 ] )
|
||||
[41] (byte*) print_char_cursor#10 ← ++ (byte*) print_char_cursor#27 [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char_cursor#10 ] )
|
||||
to:print_char::@return
|
||||
print_char::@return: scope:[print_char] from print_char
|
||||
[42] return [ print_char_cursor#10 ] ( main:2::print_dword:15::print_word:21::print_byte:27::print_char:34 [ print_dword::dw#0 print_word::w#2 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:34 [ print_word::w#2 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:34 [ print_dword::dw#0 print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:34 [ print_byte::b#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:27::print_char:37 [ print_dword::dw#0 print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:27::print_char:37 [ print_word::w#2 print_char_cursor#10 ] main:2::print_dword:15::print_word:21::print_byte:29::print_char:37 [ print_dword::dw#0 print_char_cursor#10 ] main:2::print_dword:15::print_word:23::print_byte:29::print_char:37 [ print_char_cursor#10 ] )
|
||||
to:@return
|
||||
mulf16u: scope:[mulf16u] from main::@6
|
||||
[43] *((const word*) mulf16u::memA#0) ← (const word) main::a#0 [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] )
|
||||
[44] *((const word*) mulf16u::memB#0) ← (const word) main::b#0 [ ] ( main:2::mulf16u:10 [ print_char_cursor#16 ] )
|
||||
asm { ldamemA stasm1a+1 stasm3a+1 stasm5a+1 stasm7a+1 eor#$ff stasm2a+1 stasm4a+1 stasm6a+1 stasm8a+1 ldamemA+1 stasm1b+1 stasm3b+1 stasm5b+1 stasm7b+1 eor#$ff stasm2b+1 stasm4b+1 stasm6b+1 stasm8b+1 ldxmemB sec sm1a: ldamulf_sqr1_lo,x sm2a: sbcmulf_sqr2_lo,x stamemR+0 sm3a: ldamulf_sqr1_hi,x sm4a: sbcmulf_sqr2_hi,x sta_AA+1 sec sm1b: ldamulf_sqr1_lo,x sm2b: sbcmulf_sqr2_lo,x sta_cc+1 sm3b: ldamulf_sqr1_hi,x sm4b: sbcmulf_sqr2_hi,x sta_CC+1 ldxmemB+1 sec sm5a: ldamulf_sqr1_lo,x sm6a: sbcmulf_sqr2_lo,x sta_bb+1 sm7a: ldamulf_sqr1_hi,x sm8a: sbcmulf_sqr2_hi,x sta_BB+1 sec sm5b: ldamulf_sqr1_lo,x sm6b: sbcmulf_sqr2_lo,x sta_dd+1 sm7b: ldamulf_sqr1_hi,x sm8b: sbcmulf_sqr2_hi,x stamemR+3 clc _AA: lda#0 _bb: adc#0 stamemR+1 _BB: lda#0 _CC: adc#0 stamemR+2 bcc!+ incmemR+3 clc !: _cc: lda#0 adcmemR+1 stamemR+1 _dd: lda#0 adcmemR+2 stamemR+2 bcc!+ incmemR+3 !: }
|
||||
[46] (dword) mulf16u::return#1 ← *((const dword*) mulf16u::memR#0) [ mulf16u::return#1 ] ( main:2::mulf16u:10 [ print_char_cursor#16 mulf16u::return#1 ] )
|
||||
to:mulf16u::@return
|
||||
mulf16u::@return: scope:[mulf16u] from mulf16u
|
||||
[47] return [ mulf16u::return#1 ] ( main:2::mulf16u:10 [ print_char_cursor#16 mulf16u::return#1 ] )
|
||||
to:@return
|
||||
mulf_init: scope:[mulf_init] from main
|
||||
[48] phi() [ ] ( main:2::mulf_init:5 [ ] )
|
||||
to:mulf_init::@1
|
||||
mulf_init::@1: scope:[mulf_init] from mulf_init mulf_init::@2
|
||||
[49] (byte) mulf_init::x_2#3 ← phi( mulf_init/(byte/signed byte/word/signed word/dword/signed dword) 0 mulf_init::@2/(byte) mulf_init::x_2#2 ) [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] )
|
||||
[49] (byte*) mulf_init::sqr1_hi#2 ← phi( mulf_init/(const byte[512]) mulf_sqr1_hi#0+(byte/signed byte/word/signed word/dword/signed dword) 1 mulf_init::@2/(byte*) mulf_init::sqr1_hi#1 ) [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] )
|
||||
[49] (byte*) mulf_init::sqr1_lo#2 ← phi( mulf_init/(const byte[512]) mulf_sqr1_lo#0+(byte/signed byte/word/signed word/dword/signed dword) 1 mulf_init::@2/(byte*) mulf_init::sqr1_lo#1 ) [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] )
|
||||
[49] (word) mulf_init::sqr#4 ← phi( mulf_init/(byte/signed byte/word/signed word/dword/signed dword) 0 mulf_init::@2/(word) mulf_init::sqr#1 ) [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] )
|
||||
[49] (byte) mulf_init::c#2 ← phi( mulf_init/(byte/signed byte/word/signed word/dword/signed dword) 0 mulf_init::@2/(byte) mulf_init::c#1 ) [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] ( main:2::mulf_init:5 [ mulf_init::c#2 mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 ] )
|
||||
[50] (byte) mulf_init::c#1 ← ++ (byte) mulf_init::c#2 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 ] )
|
||||
[51] (byte~) mulf_init::$2 ← (byte) mulf_init::c#1 & (byte/signed byte/word/signed word/dword/signed dword) 1 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$2 ] ( main:2::mulf_init:5 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 mulf_init::$2 ] )
|
||||
[52] if((byte~) mulf_init::$2!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@2 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::x_2#3 mulf_init::c#1 ] )
|
||||
to:mulf_init::@5
|
||||
mulf_init::@5: scope:[mulf_init] from mulf_init::@1
|
||||
[53] (byte) mulf_init::x_2#1 ← ++ (byte) mulf_init::x_2#3 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr#4 mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#1 ] )
|
||||
[54] (word) mulf_init::sqr#2 ← ++ (word) mulf_init::sqr#4 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#1 mulf_init::sqr#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#1 mulf_init::sqr#2 ] )
|
||||
to:mulf_init::@2
|
||||
mulf_init::@2: scope:[mulf_init] from mulf_init::@1 mulf_init::@5
|
||||
[55] (byte) mulf_init::x_2#2 ← phi( mulf_init::@1/(byte) mulf_init::x_2#3 mulf_init::@5/(byte) mulf_init::x_2#1 ) [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] )
|
||||
[55] (word) mulf_init::sqr#3 ← phi( mulf_init::@1/(word) mulf_init::sqr#4 mulf_init::@5/(word) mulf_init::sqr#2 ) [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] )
|
||||
[56] (byte~) mulf_init::$5 ← < (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$5 ] )
|
||||
[57] *((byte*) mulf_init::sqr1_lo#2) ← (byte~) mulf_init::$5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] )
|
||||
[58] (byte~) mulf_init::$6 ← > (word) mulf_init::sqr#3 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$6 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 mulf_init::$6 ] )
|
||||
[59] *((byte*) mulf_init::sqr1_hi#2) ← (byte~) mulf_init::$6 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_hi#2 mulf_init::c#1 mulf_init::x_2#2 mulf_init::sqr#3 ] )
|
||||
[60] (byte*) mulf_init::sqr1_hi#1 ← ++ (byte*) mulf_init::sqr1_hi#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 mulf_init::sqr#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 mulf_init::sqr#3 ] )
|
||||
[61] (word) mulf_init::sqr#1 ← (word) mulf_init::sqr#3 + (byte) mulf_init::x_2#2 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:5 [ mulf_init::sqr1_lo#2 mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] )
|
||||
[62] (byte*) mulf_init::sqr1_lo#1 ← ++ (byte*) mulf_init::sqr1_lo#2 [ mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_lo#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:5 [ mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_lo#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] )
|
||||
[63] if((byte*) mulf_init::sqr1_lo#1!=(const byte[512]) mulf_sqr1_lo#0+(word/signed word/dword/signed dword) 512) goto mulf_init::@1 [ mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_lo#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] ( main:2::mulf_init:5 [ mulf_init::c#1 mulf_init::sqr#1 mulf_init::sqr1_lo#1 mulf_init::sqr1_hi#1 mulf_init::x_2#2 ] )
|
||||
to:mulf_init::@3
|
||||
mulf_init::@3: scope:[mulf_init] from mulf_init::@2 mulf_init::@4
|
||||
[64] (byte) mulf_init::dir#2 ← phi( mulf_init::@4/(byte) mulf_init::dir#3 mulf_init::@2/(byte/word/signed word/dword/signed dword) 255 ) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[64] (byte*) mulf_init::sqr2_hi#2 ← phi( mulf_init::@4/(byte*) mulf_init::sqr2_hi#1 mulf_init::@2/(const byte[512]) mulf_sqr2_hi#0 ) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[64] (byte*) mulf_init::sqr2_lo#2 ← phi( mulf_init::@4/(byte*) mulf_init::sqr2_lo#1 mulf_init::@2/(const byte[512]) mulf_sqr2_lo#0 ) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[64] (byte) mulf_init::x_255#2 ← phi( mulf_init::@4/(byte) mulf_init::x_255#1 mulf_init::@2/((byte))-(byte/signed byte/word/signed word/dword/signed dword) 1 ) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[65] *((byte*) mulf_init::sqr2_lo#2) ← *((const byte[512]) mulf_sqr1_lo#0 + (byte) mulf_init::x_255#2) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[66] *((byte*) mulf_init::sqr2_hi#2) ← *((const byte[512]) mulf_sqr1_hi#0 + (byte) mulf_init::x_255#2) [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::sqr2_hi#2 mulf_init::dir#2 ] )
|
||||
[67] (byte*) mulf_init::sqr2_hi#1 ← ++ (byte*) mulf_init::sqr2_hi#2 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::x_255#2 mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::sqr2_hi#1 ] )
|
||||
[68] (byte) mulf_init::x_255#1 ← (byte) mulf_init::x_255#2 + (byte) mulf_init::dir#2 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] )
|
||||
[69] if((byte) mulf_init::x_255#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto mulf_init::@12 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] )
|
||||
to:mulf_init::@4
|
||||
mulf_init::@4: scope:[mulf_init] from mulf_init::@12 mulf_init::@3
|
||||
[70] (byte) mulf_init::dir#3 ← phi( mulf_init::@12/(byte) mulf_init::dir#2 mulf_init::@3/(byte/signed byte/word/signed word/dword/signed dword) 1 ) [ mulf_init::sqr2_lo#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] )
|
||||
[71] (byte*) mulf_init::sqr2_lo#1 ← ++ (byte*) mulf_init::sqr2_lo#2 [ mulf_init::x_255#1 mulf_init::sqr2_lo#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] ( main:2::mulf_init:5 [ mulf_init::x_255#1 mulf_init::sqr2_lo#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] )
|
||||
[72] if((byte*) mulf_init::sqr2_lo#1!=(const byte[512]) mulf_sqr2_lo#0+(word/signed word/dword/signed dword) 511) goto mulf_init::@3 [ mulf_init::x_255#1 mulf_init::sqr2_lo#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] ( main:2::mulf_init:5 [ mulf_init::x_255#1 mulf_init::sqr2_lo#1 mulf_init::sqr2_hi#1 mulf_init::dir#3 ] )
|
||||
to:mulf_init::@8
|
||||
mulf_init::@8: scope:[mulf_init] from mulf_init::@4
|
||||
[73] *((const byte[512]) mulf_sqr2_lo#0+(word/signed word/dword/signed dword) 511) ← *((const byte[512]) mulf_sqr1_lo#0+(word/signed word/dword/signed dword) 256) [ ] ( main:2::mulf_init:5 [ ] )
|
||||
[74] *((const byte[512]) mulf_sqr2_hi#0+(word/signed word/dword/signed dword) 511) ← *((const byte[512]) mulf_sqr1_hi#0+(word/signed word/dword/signed dword) 256) [ ] ( main:2::mulf_init:5 [ ] )
|
||||
to:mulf_init::@return
|
||||
mulf_init::@return: scope:[mulf_init] from mulf_init::@8
|
||||
[75] return [ ] ( main:2::mulf_init:5 [ ] )
|
||||
to:@return
|
||||
mulf_init::@12: scope:[mulf_init] from mulf_init::@3
|
||||
[76] phi() [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] ( main:2::mulf_init:5 [ mulf_init::sqr2_lo#2 mulf_init::dir#2 mulf_init::x_255#1 mulf_init::sqr2_hi#1 ] )
|
||||
to:mulf_init::@4
|
3324
src/test/ref/min-fmul-16.log
Normal file
3324
src/test/ref/min-fmul-16.log
Normal file
File diff suppressed because it is too large
Load Diff
140
src/test/ref/min-fmul-16.sym
Normal file
140
src/test/ref/min-fmul-16.sym
Normal file
@ -0,0 +1,140 @@
|
||||
(label) @17
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BORDERCOL
|
||||
(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@13
|
||||
(label) main::@14
|
||||
(label) main::@15
|
||||
(label) main::@4
|
||||
(label) main::@6
|
||||
(word) main::a
|
||||
(const word) main::a#0 a = (word/signed word/dword/signed dword) 1234
|
||||
(word) main::b
|
||||
(const word) main::b#0 b = (word/signed word/dword/signed dword) 2345
|
||||
(dword) main::r
|
||||
(dword) main::r#0 r zp ZP_DWORD:9 11.0
|
||||
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
|
||||
(label) mulf16u::@return
|
||||
(word) mulf16u::a
|
||||
(word) mulf16u::b
|
||||
(word*) mulf16u::memA
|
||||
(const word*) mulf16u::memA#0 memA = ((word*))(byte/word/signed word/dword/signed dword) 248
|
||||
(word*) mulf16u::memB
|
||||
(const word*) mulf16u::memB#0 memB = ((word*))(byte/word/signed word/dword/signed dword) 250
|
||||
(dword*) mulf16u::memR
|
||||
(const dword*) mulf16u::memR#0 memR = ((dword*))(byte/word/signed word/dword/signed dword) 252
|
||||
(dword) mulf16u::return
|
||||
(dword) mulf16u::return#0 return zp ZP_DWORD:9 22.0
|
||||
(dword) mulf16u::return#1 return zp ZP_DWORD:9 4.333333333333333
|
||||
(void()) mulf_init()
|
||||
(byte~) mulf_init::$2 reg byte a 22.0
|
||||
(byte~) mulf_init::$5 reg byte a 22.0
|
||||
(byte~) mulf_init::$6 reg byte a 22.0
|
||||
(label) mulf_init::@1
|
||||
(label) mulf_init::@12
|
||||
(label) mulf_init::@2
|
||||
(label) mulf_init::@3
|
||||
(label) mulf_init::@4
|
||||
(label) mulf_init::@5
|
||||
(label) mulf_init::@8
|
||||
(label) mulf_init::@return
|
||||
(byte) mulf_init::c
|
||||
(byte) mulf_init::c#1 reg byte x 2.357142857142857
|
||||
(byte) mulf_init::c#2 reg byte x 22.0
|
||||
(byte) mulf_init::dir
|
||||
(byte) mulf_init::dir#2 dir zp ZP_BYTE:6 4.714285714285714
|
||||
(byte) mulf_init::dir#3 dir zp ZP_BYTE:6 7.333333333333333
|
||||
(word) mulf_init::sqr
|
||||
(word) mulf_init::sqr#1 sqr zp ZP_WORD:7 7.333333333333333
|
||||
(word) mulf_init::sqr#2 sqr zp ZP_WORD:7 22.0
|
||||
(word) mulf_init::sqr#3 sqr zp ZP_WORD:7 9.166666666666666
|
||||
(word) mulf_init::sqr#4 sqr zp ZP_WORD:7 6.6000000000000005
|
||||
(byte*) mulf_init::sqr1_hi
|
||||
(byte*) mulf_init::sqr1_hi#1 sqr1_hi zp ZP_WORD:4 5.5
|
||||
(byte*) mulf_init::sqr1_hi#2 sqr1_hi zp ZP_WORD:4 3.0
|
||||
(byte*) mulf_init::sqr1_lo
|
||||
(byte*) mulf_init::sqr1_lo#1 sqr1_lo zp ZP_WORD:2 16.5
|
||||
(byte*) mulf_init::sqr1_lo#2 sqr1_lo zp ZP_WORD:2 2.5384615384615383
|
||||
(byte*) mulf_init::sqr2_hi
|
||||
(byte*) mulf_init::sqr2_hi#1 sqr2_hi zp ZP_WORD:4 3.142857142857143
|
||||
(byte*) mulf_init::sqr2_hi#2 sqr2_hi zp ZP_WORD:4 11.0
|
||||
(byte*) mulf_init::sqr2_lo
|
||||
(byte*) mulf_init::sqr2_lo#1 sqr2_lo zp ZP_WORD:2 16.5
|
||||
(byte*) mulf_init::sqr2_lo#2 sqr2_lo zp ZP_WORD:2 4.125
|
||||
(byte) mulf_init::x_2
|
||||
(byte) mulf_init::x_2#1 x_2 zp ZP_BYTE:6 11.0
|
||||
(byte) mulf_init::x_2#2 x_2 zp ZP_BYTE:6 4.888888888888889
|
||||
(byte) mulf_init::x_2#3 x_2 zp ZP_BYTE:6 8.25
|
||||
(byte) mulf_init::x_255
|
||||
(byte) mulf_init::x_255#1 reg byte x 5.5
|
||||
(byte) mulf_init::x_255#2 reg byte x 11.0
|
||||
(byte[512]) mulf_sqr1_hi
|
||||
(const byte[512]) mulf_sqr1_hi#0 mulf_sqr1_hi = { fill( 512, 0) }
|
||||
(byte[512]) mulf_sqr1_lo
|
||||
(const byte[512]) mulf_sqr1_lo#0 mulf_sqr1_lo = { fill( 512, 0) }
|
||||
(byte[512]) mulf_sqr2_hi
|
||||
(const byte[512]) mulf_sqr2_hi#0 mulf_sqr2_hi = { fill( 512, 0) }
|
||||
(byte[512]) mulf_sqr2_lo
|
||||
(const byte[512]) mulf_sqr2_lo#0 mulf_sqr2_lo = { fill( 512, 0) }
|
||||
(void()) print_byte((byte) print_byte::b)
|
||||
(byte~) print_byte::$0 reg byte a 4.0
|
||||
(byte~) print_byte::$2 reg byte a 4.0
|
||||
(label) print_byte::@1
|
||||
(label) print_byte::@return
|
||||
(byte) print_byte::b
|
||||
(byte) print_byte::b#0 reg byte x 4.0
|
||||
(byte) print_byte::b#1 reg byte x 4.0
|
||||
(byte) print_byte::b#2 reg byte x 2.0
|
||||
(void()) print_char((byte) print_char::ch)
|
||||
(label) print_char::@return
|
||||
(byte) print_char::ch
|
||||
(byte) print_char::ch#0 reg byte a 4.0
|
||||
(byte) print_char::ch#1 reg byte a 4.0
|
||||
(byte) print_char::ch#2 reg byte a 6.0
|
||||
(byte*) print_char_cursor
|
||||
(byte*) print_char_cursor#10 print_char_cursor zp ZP_WORD:4 0.6153846153846154
|
||||
(byte*) print_char_cursor#16 print_char_cursor zp ZP_WORD:4 0.2222222222222222
|
||||
(byte*) print_char_cursor#27 print_char_cursor zp ZP_WORD:4 4.0
|
||||
(byte*) print_char_cursor#34 print_char_cursor zp ZP_WORD:4 3.0
|
||||
(byte*) print_char_cursor#36 print_char_cursor zp ZP_WORD:4 2.0
|
||||
(void()) print_dword((dword) print_dword::dw)
|
||||
(label) print_dword::@1
|
||||
(label) print_dword::@return
|
||||
(dword) print_dword::dw
|
||||
(dword) print_dword::dw#0 dw zp ZP_DWORD:9 5.0
|
||||
(byte[]) print_hextab
|
||||
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_screen
|
||||
(void()) print_set_screen((byte*) print_set_screen::screen)
|
||||
(label) print_set_screen::@return
|
||||
(byte*) print_set_screen::screen
|
||||
(void()) print_word((word) print_word::w)
|
||||
(label) print_word::@1
|
||||
(label) print_word::@return
|
||||
(word) print_word::w
|
||||
(word) print_word::w#0 w zp ZP_WORD:2 4.0
|
||||
(word) print_word::w#1 w zp ZP_WORD:2 4.0
|
||||
(word) print_word::w#2 w zp ZP_WORD:2 2.6666666666666665
|
||||
|
||||
zp ZP_WORD:2 [ print_word::w#2 print_word::w#0 print_word::w#1 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ]
|
||||
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
reg byte a [ print_char::ch#2 print_char::ch#0 print_char::ch#1 ]
|
||||
zp ZP_WORD:4 [ print_char_cursor#27 print_char_cursor#36 print_char_cursor#34 print_char_cursor#16 print_char_cursor#10 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
|
||||
reg byte x [ mulf_init::c#2 mulf_init::c#1 ]
|
||||
zp ZP_BYTE:6 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 mulf_init::dir#2 mulf_init::dir#3 ]
|
||||
zp ZP_WORD:7 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
|
||||
reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
|
||||
zp ZP_DWORD:9 [ mulf16u::return#0 main::r#0 mulf16u::return#1 print_dword::dw#0 ]
|
||||
reg byte a [ print_byte::$0 ]
|
||||
reg byte a [ print_byte::$2 ]
|
||||
reg byte a [ mulf_init::$2 ]
|
||||
reg byte a [ mulf_init::$5 ]
|
||||
reg byte a [ mulf_init::$6 ]
|
@ -19,6 +19,10 @@ mul16s_compare: {
|
||||
.label b = 4
|
||||
.label ms = $a
|
||||
.label mn = $10
|
||||
lda print_line_cursor
|
||||
sta print_char_cursor
|
||||
lda print_line_cursor+1
|
||||
sta print_char_cursor+1
|
||||
ldx #0
|
||||
lda #<-$7fff
|
||||
sta b
|
||||
@ -29,6 +33,11 @@ mul16s_compare: {
|
||||
lda #>-$7fff
|
||||
sta a+1
|
||||
b1:
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
ldy #0
|
||||
b2:
|
||||
clc
|
||||
@ -79,18 +88,20 @@ mul16s_compare: {
|
||||
inx
|
||||
cpx #$10
|
||||
bne b1
|
||||
jsr print_ln
|
||||
lda print_line_cursor
|
||||
sta print_char_cursor
|
||||
lda print_line_cursor+1
|
||||
sta print_char_cursor+1
|
||||
lda #<str
|
||||
lda #<str1
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
lda #>str1
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
str: .text "signed word multiply results match!@"
|
||||
str: .text ".@"
|
||||
str1: .text "signed word multiply results match!@"
|
||||
}
|
||||
print_ln: {
|
||||
b1:
|
||||
@ -138,10 +149,6 @@ mul16s_error: {
|
||||
.label b = 4
|
||||
.label ms = $a
|
||||
.label mn = $10
|
||||
lda print_line_cursor
|
||||
sta print_char_cursor
|
||||
lda print_line_cursor+1
|
||||
sta print_char_cursor+1
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
@ -499,13 +506,24 @@ mul16u_compare: {
|
||||
.label b = $14
|
||||
.label ms = $a
|
||||
.label mn = $10
|
||||
ldx #0
|
||||
txa
|
||||
.label mf = $16
|
||||
.label i = $1a
|
||||
lda #0
|
||||
sta i
|
||||
sta b
|
||||
sta b+1
|
||||
sta a
|
||||
sta a+1
|
||||
lda #<$400
|
||||
sta print_char_cursor
|
||||
lda #>$400
|
||||
sta print_char_cursor+1
|
||||
b1:
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
ldy #0
|
||||
b2:
|
||||
clc
|
||||
@ -528,6 +546,25 @@ mul16u_compare: {
|
||||
lda a+1
|
||||
sta mul16u.a+1
|
||||
jsr mul16u
|
||||
jsr mulf16u
|
||||
lda ms
|
||||
cmp mf
|
||||
bne !+
|
||||
lda ms+1
|
||||
cmp mf+1
|
||||
bne !+
|
||||
lda ms+2
|
||||
cmp mf+2
|
||||
bne !+
|
||||
lda ms+3
|
||||
cmp mf+3
|
||||
beq b6
|
||||
!:
|
||||
ldx #0
|
||||
jmp b3
|
||||
b6:
|
||||
ldx #1
|
||||
b3:
|
||||
lda ms
|
||||
cmp mn
|
||||
bne !+
|
||||
@ -539,53 +576,52 @@ mul16u_compare: {
|
||||
bne !+
|
||||
lda ms+3
|
||||
cmp mn+3
|
||||
beq b5
|
||||
beq b4
|
||||
!:
|
||||
lda #0
|
||||
jmp b3
|
||||
b5:
|
||||
lda #1
|
||||
b3:
|
||||
cmp #0
|
||||
bne b4
|
||||
ldx #0
|
||||
b4:
|
||||
cpx #0
|
||||
bne b5
|
||||
lda #2
|
||||
sta BGCOL
|
||||
jsr mul16u_error
|
||||
breturn:
|
||||
rts
|
||||
b4:
|
||||
b5:
|
||||
iny
|
||||
cpy #$10
|
||||
bne b2
|
||||
inx
|
||||
cpx #$10
|
||||
bne b1
|
||||
lda #<$400
|
||||
sta print_char_cursor
|
||||
lda #>$400
|
||||
sta print_char_cursor+1
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
inc i
|
||||
lda i
|
||||
cmp #$10
|
||||
beq !b1+
|
||||
jmp b1
|
||||
!b1:
|
||||
lda #<$400
|
||||
sta print_line_cursor
|
||||
lda #>$400
|
||||
sta print_line_cursor+1
|
||||
jsr print_ln
|
||||
lda print_line_cursor
|
||||
sta print_char_cursor
|
||||
lda print_line_cursor+1
|
||||
sta print_char_cursor+1
|
||||
lda #<str1
|
||||
sta print_str.str
|
||||
lda #>str1
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
jsr print_ln
|
||||
jmp breturn
|
||||
str: .text "word multiply results match!@"
|
||||
str: .text ".@"
|
||||
str1: .text "word multiply results match!@"
|
||||
}
|
||||
mul16u_error: {
|
||||
.label a = 2
|
||||
.label b = $14
|
||||
.label ms = $a
|
||||
.label mn = $10
|
||||
lda #<$400
|
||||
sta print_char_cursor
|
||||
lda #>$400
|
||||
sta print_char_cursor+1
|
||||
.label mf = $16
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
@ -622,16 +658,148 @@ mul16u_error: {
|
||||
lda mn+3
|
||||
sta print_dword.dw+3
|
||||
jsr print_dword
|
||||
lda #<str4
|
||||
sta print_str.str
|
||||
lda #>str4
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda mf
|
||||
sta print_dword.dw
|
||||
lda mf+1
|
||||
sta print_dword.dw+1
|
||||
lda mf+2
|
||||
sta print_dword.dw+2
|
||||
lda mf+3
|
||||
sta print_dword.dw+3
|
||||
jsr print_dword
|
||||
lda #<$400
|
||||
sta print_line_cursor
|
||||
lda #>$400
|
||||
sta print_line_cursor+1
|
||||
jsr print_ln
|
||||
rts
|
||||
str: .text "word multiply mismatch @"
|
||||
str: .text "multiply mismatch @"
|
||||
str1: .text "*@"
|
||||
str2: .text " slow:@"
|
||||
str3: .text " / normal:@"
|
||||
str4: .text " / fast:@"
|
||||
}
|
||||
mulf16u: {
|
||||
.label memA = $f8
|
||||
.label memB = $fa
|
||||
.label memR = $fc
|
||||
.label return = $16
|
||||
.label a = 2
|
||||
.label b = $14
|
||||
lda a
|
||||
sta memA
|
||||
lda a+1
|
||||
sta memA+1
|
||||
lda b
|
||||
sta memB
|
||||
lda b+1
|
||||
sta memB+1
|
||||
lda memA
|
||||
sta sm1a+1
|
||||
sta sm3a+1
|
||||
sta sm5a+1
|
||||
sta sm7a+1
|
||||
eor #$ff
|
||||
sta sm2a+1
|
||||
sta sm4a+1
|
||||
sta sm6a+1
|
||||
sta sm8a+1
|
||||
lda memA+1
|
||||
sta sm1b+1
|
||||
sta sm3b+1
|
||||
sta sm5b+1
|
||||
sta sm7b+1
|
||||
eor #$ff
|
||||
sta sm2b+1
|
||||
sta sm4b+1
|
||||
sta sm6b+1
|
||||
sta sm8b+1
|
||||
ldx memB
|
||||
sec
|
||||
sm1a:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm2a:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta memR+0
|
||||
sm3a:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm4a:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _AA+1
|
||||
sec
|
||||
sm1b:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm2b:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _cc+1
|
||||
sm3b:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm4b:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _CC+1
|
||||
ldx memB+1
|
||||
sec
|
||||
sm5a:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm6a:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _bb+1
|
||||
sm7a:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm8a:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta _BB+1
|
||||
sec
|
||||
sm5b:
|
||||
lda mulf_sqr1_lo,x
|
||||
sm6b:
|
||||
sbc mulf_sqr2_lo,x
|
||||
sta _dd+1
|
||||
sm7b:
|
||||
lda mulf_sqr1_hi,x
|
||||
sm8b:
|
||||
sbc mulf_sqr2_hi,x
|
||||
sta memR+3
|
||||
clc
|
||||
_AA:
|
||||
lda #0
|
||||
_bb:
|
||||
adc #0
|
||||
sta memR+1
|
||||
_BB:
|
||||
lda #0
|
||||
_CC:
|
||||
adc #0
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
clc
|
||||
!:
|
||||
_cc:
|
||||
lda #0
|
||||
adc memR+1
|
||||
sta memR+1
|
||||
_dd:
|
||||
lda #0
|
||||
adc memR+2
|
||||
sta memR+2
|
||||
bcc !+
|
||||
inc memR+3
|
||||
!:
|
||||
lda memR
|
||||
sta return
|
||||
lda memR+1
|
||||
sta return+1
|
||||
lda memR+2
|
||||
sta return+2
|
||||
lda memR+3
|
||||
sta return+3
|
||||
rts
|
||||
}
|
||||
muls16u: {
|
||||
.label return = $a
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
(label) @29
|
||||
(label) @30
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -34,9 +34,10 @@
|
||||
(signed dword) mul16s::return#2 return zp ZP_DWORD:16 202.0
|
||||
(void()) mul16s_compare()
|
||||
(label) mul16s_compare::@1
|
||||
(label) mul16s_compare::@10
|
||||
(label) mul16s_compare::@11
|
||||
(label) mul16s_compare::@13
|
||||
(label) mul16s_compare::@12
|
||||
(label) mul16s_compare::@14
|
||||
(label) mul16s_compare::@15
|
||||
(label) mul16s_compare::@2
|
||||
(label) mul16s_compare::@3
|
||||
(label) mul16s_compare::@4
|
||||
@ -48,14 +49,14 @@
|
||||
(signed word) mul16s_compare::a
|
||||
(signed word) mul16s_compare::a#1 a zp ZP_WORD:2 19.857142857142858
|
||||
(signed word) mul16s_compare::a#2 a zp ZP_WORD:2 213.0
|
||||
(signed word) mul16s_compare::a#5 a zp ZP_WORD:2 22.0
|
||||
(signed word) mul16s_compare::a#5 a zp ZP_WORD:2 11.0
|
||||
(signed word) mul16s_compare::b
|
||||
(signed word) mul16s_compare::b#1 b zp ZP_WORD:4 19.857142857142858
|
||||
(signed word) mul16s_compare::b#2 b zp ZP_WORD:4 106.5
|
||||
(signed word) mul16s_compare::b#5 b zp ZP_WORD:4 22.0
|
||||
(signed word) mul16s_compare::b#5 b zp ZP_WORD:4 11.0
|
||||
(byte) mul16s_compare::i
|
||||
(byte) mul16s_compare::i#1 reg byte x 16.5
|
||||
(byte) mul16s_compare::i#9 reg byte x 1.1
|
||||
(byte) mul16s_compare::i#10 reg byte x 1.0476190476190477
|
||||
(byte) mul16s_compare::j
|
||||
(byte) mul16s_compare::j#1 reg byte y 151.5
|
||||
(byte) mul16s_compare::j#2 reg byte y 11.882352941176471
|
||||
@ -65,7 +66,8 @@
|
||||
(signed dword) mul16s_compare::ms#0 ms zp ZP_DWORD:10 15.692307692307692
|
||||
(byte) mul16s_compare::ok
|
||||
(byte) mul16s_compare::ok#2 reg byte a 101.0
|
||||
(const string) mul16s_compare::str str = (string) "signed word multiply results match!@"
|
||||
(const string) mul16s_compare::str str = (string) ".@"
|
||||
(const string) mul16s_compare::str1 str1 = (string) "signed word multiply results match!@"
|
||||
(void()) mul16s_error((signed word) mul16s_error::a , (signed word) mul16s_error::b , (signed dword) mul16s_error::ms , (signed dword) mul16s_error::mn)
|
||||
(label) mul16s_error::@1
|
||||
(label) mul16s_error::@2
|
||||
@ -121,37 +123,46 @@
|
||||
(label) mul16u_compare::@10
|
||||
(label) mul16u_compare::@11
|
||||
(label) mul16u_compare::@13
|
||||
(label) mul16u_compare::@14
|
||||
(label) mul16u_compare::@15
|
||||
(label) mul16u_compare::@17
|
||||
(label) mul16u_compare::@18
|
||||
(label) mul16u_compare::@2
|
||||
(label) mul16u_compare::@22
|
||||
(label) mul16u_compare::@3
|
||||
(label) mul16u_compare::@4
|
||||
(label) mul16u_compare::@5
|
||||
(label) mul16u_compare::@6
|
||||
(label) mul16u_compare::@8
|
||||
(label) mul16u_compare::@9
|
||||
(label) mul16u_compare::@return
|
||||
(word) mul16u_compare::a
|
||||
(word) mul16u_compare::a#1 a zp ZP_WORD:2 19.857142857142858
|
||||
(word) mul16u_compare::a#1 a zp ZP_WORD:2 17.862068965517242
|
||||
(word) mul16u_compare::a#2 a zp ZP_WORD:2 213.0
|
||||
(word) mul16u_compare::a#5 a zp ZP_WORD:2 22.0
|
||||
(word) mul16u_compare::a#6 a zp ZP_WORD:2 11.0
|
||||
(word) mul16u_compare::b
|
||||
(word) mul16u_compare::b#1 b zp ZP_WORD:20 19.857142857142858
|
||||
(word) mul16u_compare::b#1 b zp ZP_WORD:20 17.862068965517242
|
||||
(word) mul16u_compare::b#2 b zp ZP_WORD:20 106.5
|
||||
(word) mul16u_compare::b#5 b zp ZP_WORD:20 22.0
|
||||
(word) mul16u_compare::b#6 b zp ZP_WORD:20 11.0
|
||||
(byte) mul16u_compare::i
|
||||
(byte) mul16u_compare::i#1 reg byte x 16.5
|
||||
(byte) mul16u_compare::i#9 reg byte x 1.1
|
||||
(byte) mul16u_compare::i#1 i zp ZP_BYTE:26 16.5
|
||||
(byte) mul16u_compare::i#12 i zp ZP_BYTE:26 0.7586206896551724
|
||||
(byte) mul16u_compare::j
|
||||
(byte) mul16u_compare::j#1 reg byte y 151.5
|
||||
(byte) mul16u_compare::j#2 reg byte y 11.882352941176471
|
||||
(byte) mul16u_compare::j#10 reg byte y 8.08
|
||||
(dword) mul16u_compare::mf
|
||||
(dword) mul16u_compare::mf#0 mf zp ZP_DWORD:22 15.692307692307692
|
||||
(dword) mul16u_compare::mn
|
||||
(dword) mul16u_compare::mn#0 mn zp ZP_DWORD:16 22.666666666666664
|
||||
(dword) mul16u_compare::mn#0 mn zp ZP_DWORD:16 12.0
|
||||
(dword) mul16u_compare::ms
|
||||
(dword) mul16u_compare::ms#0 ms zp ZP_DWORD:10 15.692307692307692
|
||||
(dword) mul16u_compare::ms#0 ms zp ZP_DWORD:10 14.523809523809522
|
||||
(byte) mul16u_compare::ok
|
||||
(byte) mul16u_compare::ok#2 reg byte a 101.0
|
||||
(const string) mul16u_compare::str str = (string) "word multiply results match!@"
|
||||
(void()) mul16u_error((word) mul16u_error::a , (word) mul16u_error::b , (dword) mul16u_error::ms , (dword) mul16u_error::mn)
|
||||
(byte) mul16u_compare::ok#3 reg byte x 202.0
|
||||
(byte) mul16u_compare::ok#4 reg byte x 33.666666666666664
|
||||
(const string) mul16u_compare::str str = (string) ".@"
|
||||
(const string) mul16u_compare::str1 str1 = (string) "word multiply results match!@"
|
||||
(void()) mul16u_error((word) mul16u_error::a , (word) mul16u_error::b , (dword) mul16u_error::ms , (dword) mul16u_error::mn , (dword) mul16u_error::mf)
|
||||
(label) mul16u_error::@1
|
||||
(label) mul16u_error::@10
|
||||
(label) mul16u_error::@2
|
||||
(label) mul16u_error::@3
|
||||
(label) mul16u_error::@4
|
||||
@ -159,19 +170,38 @@
|
||||
(label) mul16u_error::@6
|
||||
(label) mul16u_error::@7
|
||||
(label) mul16u_error::@8
|
||||
(label) mul16u_error::@9
|
||||
(label) mul16u_error::@return
|
||||
(word) mul16u_error::a
|
||||
(word) mul16u_error::a#0 a zp ZP_WORD:2 0.6666666666666666
|
||||
(word) mul16u_error::a#0 a zp ZP_WORD:2 0.5714285714285714
|
||||
(word) mul16u_error::b
|
||||
(word) mul16u_error::b#0 b zp ZP_WORD:20 0.4444444444444444
|
||||
(word) mul16u_error::b#0 b zp ZP_WORD:20 0.4
|
||||
(dword) mul16u_error::mf
|
||||
(dword) mul16u_error::mf#0 mf zp ZP_DWORD:22 0.21052631578947367
|
||||
(dword) mul16u_error::mn
|
||||
(dword) mul16u_error::mn#0 mn zp ZP_DWORD:16 0.26666666666666666
|
||||
(dword) mul16u_error::mn#0 mn zp ZP_DWORD:16 0.25
|
||||
(dword) mul16u_error::ms
|
||||
(dword) mul16u_error::ms#0 ms zp ZP_DWORD:10 0.3333333333333333
|
||||
(const string) mul16u_error::str str = (string) "word multiply mismatch @"
|
||||
(dword) mul16u_error::ms#0 ms zp ZP_DWORD:10 0.3076923076923077
|
||||
(const string) mul16u_error::str str = (string) "multiply mismatch @"
|
||||
(const string) mul16u_error::str1 str1 = (string) "*@"
|
||||
(const string) mul16u_error::str2 str2 = (string) " slow:@"
|
||||
(const string) mul16u_error::str3 str3 = (string) " / normal:@"
|
||||
(const string) mul16u_error::str4 str4 = (string) " / fast:@"
|
||||
(dword()) mulf16u((word) mulf16u::a , (word) mulf16u::b)
|
||||
(label) mulf16u::@return
|
||||
(word) mulf16u::a
|
||||
(word) mulf16u::a#0 a zp ZP_WORD:2 51.5
|
||||
(word) mulf16u::b
|
||||
(word) mulf16u::b#0 b zp ZP_WORD:20 51.5
|
||||
(word*) mulf16u::memA
|
||||
(const word*) mulf16u::memA#0 memA = ((word*))(byte/word/signed word/dword/signed dword) 248
|
||||
(word*) mulf16u::memB
|
||||
(const word*) mulf16u::memB#0 memB = ((word*))(byte/word/signed word/dword/signed dword) 250
|
||||
(dword*) mulf16u::memR
|
||||
(const dword*) mulf16u::memR#0 memR = ((dword*))(byte/word/signed word/dword/signed dword) 252
|
||||
(dword) mulf16u::return
|
||||
(dword) mulf16u::return#0 return zp ZP_DWORD:22 34.33333333333333
|
||||
(dword) mulf16u::return#2 return zp ZP_DWORD:22 202.0
|
||||
(void()) mulf_init()
|
||||
(byte~) mulf_init::$2 reg byte a 22.0
|
||||
(byte~) mulf_init::$5 reg byte a 22.0
|
||||
@ -279,19 +309,22 @@
|
||||
(byte) print_char::ch#3 reg byte a 4.0
|
||||
(byte) print_char::ch#4 reg byte a 6.0
|
||||
(byte*) print_char_cursor
|
||||
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:14 11.0
|
||||
(byte*) print_char_cursor#112 print_char_cursor zp ZP_WORD:14 1.8333333333333333
|
||||
(byte*) print_char_cursor#113 print_char_cursor zp ZP_WORD:14 4.75
|
||||
(byte*) print_char_cursor#114 print_char_cursor zp ZP_WORD:14 3.0
|
||||
(byte*) print_char_cursor#116 print_char_cursor zp ZP_WORD:14 6.0
|
||||
(byte*) print_char_cursor#117 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*) print_char_cursor#118 print_char_cursor zp ZP_WORD:14 3.0
|
||||
(byte*) print_char_cursor#120 print_char_cursor zp ZP_WORD:14 2.0
|
||||
(byte*) print_char_cursor#130 print_char_cursor zp ZP_WORD:14 18.0
|
||||
(byte*~) print_char_cursor#158 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*~) print_char_cursor#159 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*) print_char_cursor#20 print_char_cursor zp ZP_WORD:14 0.7179487179487181
|
||||
(byte*) print_char_cursor#76 print_char_cursor zp ZP_WORD:14 6.0
|
||||
(byte*) print_char_cursor#1 print_char_cursor zp ZP_WORD:14 101.0
|
||||
(byte*) print_char_cursor#124 print_char_cursor zp ZP_WORD:14 3.6060606060606064
|
||||
(byte*) print_char_cursor#125 print_char_cursor zp ZP_WORD:14 5.75
|
||||
(byte*) print_char_cursor#126 print_char_cursor zp ZP_WORD:14 3.0
|
||||
(byte*) print_char_cursor#128 print_char_cursor zp ZP_WORD:14 6.0
|
||||
(byte*) print_char_cursor#129 print_char_cursor zp ZP_WORD:14 5.0
|
||||
(byte*) print_char_cursor#130 print_char_cursor zp ZP_WORD:14 3.0
|
||||
(byte*) print_char_cursor#132 print_char_cursor zp ZP_WORD:14 2.0
|
||||
(byte*) print_char_cursor#135 print_char_cursor zp ZP_WORD:14 22.0
|
||||
(byte*) print_char_cursor#139 print_char_cursor zp ZP_WORD:14 24.0
|
||||
(byte*) print_char_cursor#144 print_char_cursor zp ZP_WORD:14 46.0
|
||||
(byte*~) print_char_cursor#169 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*~) print_char_cursor#178 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*~) print_char_cursor#184 print_char_cursor zp ZP_WORD:14 4.0
|
||||
(byte*) print_char_cursor#20 print_char_cursor zp ZP_WORD:14 0.7317073170731708
|
||||
(byte*) print_char_cursor#82 print_char_cursor zp ZP_WORD:14 6.0
|
||||
(void()) print_cls()
|
||||
(label) print_cls::@1
|
||||
(label) print_cls::@return
|
||||
@ -305,13 +338,14 @@
|
||||
(dword) print_dword::dw#0 dw zp ZP_DWORD:10 4.0
|
||||
(dword) print_dword::dw#1 dw zp ZP_DWORD:10 4.0
|
||||
(dword) print_dword::dw#2 dw zp ZP_DWORD:10 4.0
|
||||
(dword) print_dword::dw#3 dw zp ZP_DWORD:10 3.333333333333333
|
||||
(dword) print_dword::dw#3 dw zp ZP_DWORD:10 4.0
|
||||
(dword) print_dword::dw#4 dw zp ZP_DWORD:10 3.9999999999999996
|
||||
(byte[]) print_hextab
|
||||
(const byte[]) print_hextab#0 print_hextab = (string) "0123456789abcdef"
|
||||
(byte*) print_line_cursor
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:6 0.7068965517241378
|
||||
(byte*) print_line_cursor#20 print_line_cursor zp ZP_WORD:6 24.0
|
||||
(byte*) print_line_cursor#39 print_line_cursor zp ZP_WORD:6 6.0
|
||||
(byte*) print_line_cursor#1 print_line_cursor zp ZP_WORD:6 0.7230769230769231
|
||||
(byte*) print_line_cursor#22 print_line_cursor zp ZP_WORD:6 24.0
|
||||
(byte*) print_line_cursor#43 print_line_cursor zp ZP_WORD:6 10.0
|
||||
(void()) print_ln()
|
||||
(label) print_ln::@1
|
||||
(label) print_ln::@return
|
||||
@ -332,9 +366,9 @@
|
||||
(label) print_str::@2
|
||||
(label) print_str::@return
|
||||
(byte*) print_str::str
|
||||
(byte*) print_str::str#0 str zp ZP_WORD:8 22.0
|
||||
(byte*) print_str::str#11 str zp ZP_WORD:8 11.5
|
||||
(byte*) print_str::str#13 str zp ZP_WORD:8 2.0
|
||||
(byte*) print_str::str#0 str zp ZP_WORD:8 202.0
|
||||
(byte*) print_str::str#14 str zp ZP_WORD:8 101.5
|
||||
(byte*) print_str::str#16 str zp ZP_WORD:8 2.0
|
||||
(void()) print_sword((signed word) print_sword::w)
|
||||
(label) print_sword::@1
|
||||
(label) print_sword::@2
|
||||
@ -357,25 +391,24 @@
|
||||
(word) print_word::w#4 w zp ZP_WORD:2 4.0
|
||||
(word) print_word::w#5 w zp ZP_WORD:2 4.666666666666666
|
||||
|
||||
reg byte x [ mul16s_compare::i#9 mul16s_compare::i#1 ]
|
||||
zp ZP_WORD:2 [ mul16s_compare::a#2 mul16s_compare::a#5 mul16s_compare::a#1 muls16s::a#0 mul16s::a#0 mul16s_error::a#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#1 print_word::w#2 print_word::w#11 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 mul16u_error::a#0 mul16u_compare::a#2 mul16u_compare::a#5 mul16u_compare::a#1 muls16u::a#0 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 print_cls::sc#2 print_cls::sc#1 ]
|
||||
reg byte x [ mul16s_compare::i#10 mul16s_compare::i#1 ]
|
||||
zp ZP_WORD:2 [ mul16s_compare::a#2 mul16s_compare::a#5 mul16s_compare::a#1 muls16s::a#0 mul16s::a#0 mul16s_error::a#0 print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#1 print_word::w#2 print_word::w#11 print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 mul16u_error::a#0 mul16u_compare::a#2 mul16u_compare::a#6 mul16u_compare::a#1 muls16u::a#0 mulf16u::a#0 mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 print_cls::sc#2 print_cls::sc#1 ]
|
||||
zp ZP_WORD:4 [ mul16s_compare::b#2 mul16s_compare::b#5 mul16s_compare::b#1 muls16s::b#0 mul16s::b#0 mul16s_error::b#0 muls16u::i#2 muls16u::i#1 mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ]
|
||||
reg byte y [ mul16s_compare::j#2 mul16s_compare::j#1 ]
|
||||
reg byte a [ mul16s_compare::ok#2 ]
|
||||
zp ZP_WORD:6 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
|
||||
zp ZP_WORD:8 [ print_str::str#11 print_str::str#13 print_str::str#0 mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 muls16s::j#2 muls16s::j#1 muls16s::i#2 muls16s::i#1 mul16s::$6 mul16s::$16 mul16s::$12 mul16s::$17 ]
|
||||
zp ZP_DWORD:10 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#0 print_dword::dw#3 print_dword::dw#1 print_dword::dw#2 print_dword::dw#0 mul16s_error::ms#0 mul16s_compare::ms#0 mul16u_compare::ms#0 mul16u_error::ms#0 muls16s::m#5 muls16s::return#0 muls16s::m#3 muls16s::m#1 muls16s::m#2 muls16s::return#2 muls16u::return#0 muls16u::m#3 muls16u::m#1 muls16u::return#2 ]
|
||||
zp ZP_WORD:6 [ print_line_cursor#22 print_line_cursor#43 print_line_cursor#1 mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ]
|
||||
zp ZP_WORD:8 [ print_str::str#14 print_str::str#16 print_str::str#0 mul16u::a#3 mul16u::a#6 mul16u::a#8 mul16u::a#2 mul16u::a#0 muls16s::j#2 muls16s::j#1 muls16s::i#2 muls16s::i#1 mul16s::$6 mul16s::$16 mul16s::$12 mul16s::$17 ]
|
||||
zp ZP_DWORD:10 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#0 print_dword::dw#4 print_dword::dw#1 print_dword::dw#2 print_dword::dw#3 print_dword::dw#0 mul16s_error::ms#0 mul16s_compare::ms#0 mul16u_compare::ms#0 mul16u_error::ms#0 muls16s::m#5 muls16s::return#0 muls16s::m#3 muls16s::m#1 muls16s::m#2 muls16s::return#2 muls16u::return#0 muls16u::m#3 muls16u::m#1 muls16u::return#2 ]
|
||||
reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ]
|
||||
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
|
||||
zp ZP_WORD:14 [ print_char_cursor#76 print_char_cursor#120 print_char_cursor#116 print_char_cursor#117 print_char_cursor#118 print_char_cursor#130 print_char_cursor#158 print_char_cursor#159 print_char_cursor#113 print_char_cursor#112 print_char_cursor#20 print_char_cursor#1 print_char_cursor#114 ]
|
||||
zp ZP_WORD:14 [ print_char_cursor#82 print_char_cursor#132 print_char_cursor#128 print_char_cursor#129 print_char_cursor#130 print_char_cursor#144 print_char_cursor#125 print_char_cursor#139 print_char_cursor#169 print_char_cursor#124 print_char_cursor#20 print_char_cursor#178 print_char_cursor#135 print_char_cursor#184 print_char_cursor#1 print_char_cursor#126 ]
|
||||
zp ZP_DWORD:16 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 mul16u::return#2 mul16s::return#0 mul16u::res#2 mul16u::res#6 mul16u::res#1 mul16u::return#3 mul16s::return#2 mul16s_compare::mn#0 mul16s_error::mn#0 mul16u_compare::mn#0 mul16u_error::mn#0 ]
|
||||
zp ZP_WORD:20 [ mul16u::b#2 mul16u::b#3 mul16u::b#1 mul16u_compare::b#2 mul16u_compare::b#5 mul16u_compare::b#1 muls16u::b#0 mul16u_error::b#0 ]
|
||||
zp ZP_DWORD:22 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 ]
|
||||
reg byte x [ mul16u_compare::i#9 mul16u_compare::i#1 ]
|
||||
reg byte y [ mul16u_compare::j#2 mul16u_compare::j#1 ]
|
||||
reg byte a [ mul16u_compare::ok#2 ]
|
||||
zp ZP_WORD:20 [ mul16u::b#2 mul16u::b#3 mul16u::b#1 mul16u_compare::b#2 mul16u_compare::b#6 mul16u_compare::b#1 muls16u::b#0 mulf16u::b#0 mul16u_error::b#0 ]
|
||||
zp ZP_DWORD:22 [ mul16u::mb#2 mul16u::mb#0 mul16u::mb#1 mulf16u::return#2 mul16u_compare::mf#0 mulf16u::return#0 mul16u_error::mf#0 ]
|
||||
zp ZP_BYTE:26 [ mul16u_compare::i#12 mul16u_compare::i#1 mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 mulf_init::dir#2 mulf_init::dir#3 ]
|
||||
reg byte y [ mul16u_compare::j#10 mul16u_compare::j#1 ]
|
||||
reg byte x [ mul16u_compare::ok#3 mul16u_compare::ok#4 ]
|
||||
reg byte x [ mulf_init::c#2 mulf_init::c#1 ]
|
||||
zp ZP_BYTE:26 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 mulf_init::dir#2 mulf_init::dir#3 ]
|
||||
reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ]
|
||||
reg byte a [ print_byte::$0 ]
|
||||
reg byte a [ print_byte::$2 ]
|
||||
|
@ -1,13 +1,13 @@
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@31
|
||||
@31: scope:[] from @begin
|
||||
to:@32
|
||||
@32: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @31
|
||||
@end: scope:[] from @32
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @31
|
||||
main: scope:[main] from @32
|
||||
[4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 5 [ ] ( main:2 [ ] )
|
||||
[5] call print_cls [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
|
@ -324,7 +324,7 @@ mul8s::@return: scope:[mul8s] from mul8s::@2
|
||||
(byte[512]) mulf_sqr1_hi#0 ← { fill( 512, 0) }
|
||||
(byte[512]) mulf_sqr2_lo#0 ← { fill( 512, 0) }
|
||||
(byte[512]) mulf_sqr2_hi#0 ← { fill( 512, 0) }
|
||||
to:@22
|
||||
to:@23
|
||||
mulf_init: scope:[mulf_init] from main::@1
|
||||
(word) mulf_init::sqr#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
(byte) mulf_init::x_2#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0
|
||||
@ -494,17 +494,17 @@ mulf8s::@return: scope:[mulf8s] from mulf8s::@2
|
||||
(signed word) mulf8s::return#1 ← (signed word) mulf8s::return#3
|
||||
return
|
||||
to:@return
|
||||
@22: scope:[] from @19
|
||||
@23: scope:[] from @19
|
||||
(byte*) print_screen#7 ← phi( @19/(byte*) print_screen#8 )
|
||||
(byte*) print_char_cursor#160 ← phi( @19/(byte*) print_char_cursor#168 )
|
||||
(byte*) print_line_cursor#67 ← phi( @19/(byte*) print_line_cursor#78 )
|
||||
(byte*) BGCOL#0 ← ((byte*)) (word/dword/signed dword) 53281
|
||||
to:@25
|
||||
main: scope:[main] from @31
|
||||
(byte*) print_char_cursor#138 ← phi( @31/(byte*) print_char_cursor#148 )
|
||||
(byte*) print_line_cursor#46 ← phi( @31/(byte*) print_line_cursor#56 )
|
||||
(byte*) print_screen#4 ← phi( @31/(byte*) print_screen#5 )
|
||||
(byte*) BGCOL#1 ← phi( @31/(byte*) BGCOL#5 )
|
||||
to:@26
|
||||
main: scope:[main] from @32
|
||||
(byte*) print_char_cursor#138 ← phi( @32/(byte*) print_char_cursor#148 )
|
||||
(byte*) print_line_cursor#46 ← phi( @32/(byte*) print_line_cursor#56 )
|
||||
(byte*) print_screen#4 ← phi( @32/(byte*) print_screen#5 )
|
||||
(byte*) BGCOL#1 ← phi( @32/(byte*) BGCOL#5 )
|
||||
*((byte*) BGCOL#1) ← (byte/signed byte/word/signed word/dword/signed dword) 5
|
||||
call print_cls
|
||||
to:main::@1
|
||||
@ -652,16 +652,16 @@ muls8s::@return: scope:[muls8s] from muls8s::@4
|
||||
(signed word) muls8s::return#1 ← (signed word) muls8s::return#3
|
||||
return
|
||||
to:@return
|
||||
@25: scope:[] from @22
|
||||
(byte*) print_screen#6 ← phi( @22/(byte*) print_screen#7 )
|
||||
(byte*) print_char_cursor#159 ← phi( @22/(byte*) print_char_cursor#160 )
|
||||
(byte*) print_line_cursor#66 ← phi( @22/(byte*) print_line_cursor#67 )
|
||||
(byte*) BGCOL#15 ← phi( @22/(byte*) BGCOL#0 )
|
||||
@26: scope:[] from @23
|
||||
(byte*) print_screen#6 ← phi( @23/(byte*) print_screen#7 )
|
||||
(byte*) print_char_cursor#159 ← phi( @23/(byte*) print_char_cursor#160 )
|
||||
(byte*) print_line_cursor#66 ← phi( @23/(byte*) print_line_cursor#67 )
|
||||
(byte*) BGCOL#15 ← phi( @23/(byte*) BGCOL#0 )
|
||||
(byte[512]) mula_sqr1_lo#0 ← { fill( 512, 0) }
|
||||
(byte[512]) mula_sqr1_hi#0 ← { fill( 512, 0) }
|
||||
(byte[512]) mula_sqr2_lo#0 ← { fill( 512, 0) }
|
||||
(byte[512]) mula_sqr2_hi#0 ← { fill( 512, 0) }
|
||||
to:@31
|
||||
to:@32
|
||||
mulf_init_asm: scope:[mulf_init_asm] from main::@2
|
||||
asm { ldx#$00 txa .byte$c9 lb1: tya adc#$00 ml1: stamula_sqr1_hi,x tay cmp#$40 txa ror ml9: adc#$00 staml9+1 inx ml0: stamula_sqr1_lo,x bnelb1 incml0+2 incml1+2 clc iny bnelb1 ldx#$00 ldy#$ff !: ldamula_sqr1_hi+1,x stamula_sqr2_hi+$100,x ldamula_sqr1_hi,x stamula_sqr2_hi,y ldamula_sqr1_lo+1,x stamula_sqr2_lo+$100,x ldamula_sqr1_lo,x stamula_sqr2_lo,y dey inx bne!- }
|
||||
(byte*) mulf_init_asm::mem#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 255
|
||||
@ -1382,29 +1382,29 @@ mul8s_error::@return: scope:[mul8s_error] from mul8s_error::@11
|
||||
(byte*) print_line_cursor#21 ← (byte*) print_line_cursor#43
|
||||
return
|
||||
to:@return
|
||||
@31: scope:[] from @25
|
||||
(byte*) print_screen#5 ← phi( @25/(byte*) print_screen#6 )
|
||||
(byte*) print_char_cursor#148 ← phi( @25/(byte*) print_char_cursor#159 )
|
||||
(byte*) print_line_cursor#56 ← phi( @25/(byte*) print_line_cursor#66 )
|
||||
(byte*) BGCOL#5 ← phi( @25/(byte*) BGCOL#15 )
|
||||
@32: scope:[] from @26
|
||||
(byte*) print_screen#5 ← phi( @26/(byte*) print_screen#6 )
|
||||
(byte*) print_char_cursor#148 ← phi( @26/(byte*) print_char_cursor#159 )
|
||||
(byte*) print_line_cursor#56 ← phi( @26/(byte*) print_line_cursor#66 )
|
||||
(byte*) BGCOL#5 ← phi( @26/(byte*) BGCOL#15 )
|
||||
call main
|
||||
to:@32
|
||||
@32: scope:[] from @31
|
||||
(byte*) print_char_cursor#129 ← phi( @31/(byte*) print_char_cursor#25 )
|
||||
(byte*) print_line_cursor#44 ← phi( @31/(byte*) print_line_cursor#9 )
|
||||
to:@33
|
||||
@33: scope:[] from @32
|
||||
(byte*) print_char_cursor#129 ← phi( @32/(byte*) print_char_cursor#25 )
|
||||
(byte*) print_line_cursor#44 ← phi( @32/(byte*) print_line_cursor#9 )
|
||||
(byte*) print_line_cursor#22 ← (byte*) print_line_cursor#44
|
||||
(byte*) print_char_cursor#65 ← (byte*) print_char_cursor#129
|
||||
to:@end
|
||||
@end: scope:[] from @32
|
||||
@end: scope:[] from @33
|
||||
|
||||
SYMBOL TABLE SSA
|
||||
(const string) $0 = (string) "0123456789abcdef"
|
||||
(label) @10
|
||||
(label) @19
|
||||
(label) @22
|
||||
(label) @25
|
||||
(label) @31
|
||||
(label) @23
|
||||
(label) @26
|
||||
(label) @32
|
||||
(label) @33
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -3131,13 +3131,13 @@ Culled Empty Block (label) print_cls::@2
|
||||
Culled Empty Block (label) mul8u::@3
|
||||
Culled Empty Block (label) @19
|
||||
Culled Empty Block (label) mulf_init::@6
|
||||
Culled Empty Block (label) @22
|
||||
Culled Empty Block (label) @23
|
||||
Culled Empty Block (label) main::@6
|
||||
Culled Empty Block (label) muls8u::@3
|
||||
Culled Empty Block (label) muls8s::@1
|
||||
Culled Empty Block (label) muls8s::@2
|
||||
Culled Empty Block (label) muls8s::@7
|
||||
Culled Empty Block (label) @25
|
||||
Culled Empty Block (label) @26
|
||||
Culled Empty Block (label) mulf_tables_cmp::@9
|
||||
Culled Empty Block (label) mulf_tables_cmp::@11
|
||||
Culled Empty Block (label) mul8u_compare::@15
|
||||
@ -3146,7 +3146,7 @@ Culled Empty Block (label) mul8u_error::@11
|
||||
Culled Empty Block (label) mul8s_compare::@15
|
||||
Culled Empty Block (label) mul8s_compare::@17
|
||||
Culled Empty Block (label) mul8s_error::@11
|
||||
Culled Empty Block (label) @32
|
||||
Culled Empty Block (label) @33
|
||||
Successful SSA optimization Pass2CullEmptyBlocks
|
||||
Alias (word) mulf8u::return#0 = (word~) mulf8u::$0
|
||||
Successful SSA optimization Pass2AliasElimination
|
||||
@ -3299,7 +3299,7 @@ Added new block during phi lifting mulf_init::@11(between mulf_init::@4 and mulf
|
||||
Added new block during phi lifting mulf_init::@12(between mulf_init::@3 and mulf_init::@4)
|
||||
Added new block during phi lifting print_cls::@3(between print_cls::@1 and print_cls::@1)
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @31
|
||||
Adding NOP phi() at start of @32
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of main::@2
|
||||
@ -3480,7 +3480,7 @@ Culled Empty Block (label) mulf_init::@9
|
||||
Culled Empty Block (label) mulf_init::@10
|
||||
Culled Empty Block (label) print_cls::@3
|
||||
Adding NOP phi() at start of @begin
|
||||
Adding NOP phi() at start of @31
|
||||
Adding NOP phi() at start of @32
|
||||
Adding NOP phi() at start of @end
|
||||
Adding NOP phi() at start of main::@1
|
||||
Adding NOP phi() at start of main::@2
|
||||
@ -3520,14 +3520,14 @@ Adding NOP phi() at start of print_cls
|
||||
FINAL CONTROL FLOW GRAPH
|
||||
@begin: scope:[] from
|
||||
[0] phi() [ ] ( )
|
||||
to:@31
|
||||
@31: scope:[] from @begin
|
||||
to:@32
|
||||
@32: scope:[] from @begin
|
||||
[1] phi() [ ] ( )
|
||||
[2] call main [ ] ( )
|
||||
to:@end
|
||||
@end: scope:[] from @31
|
||||
@end: scope:[] from @32
|
||||
[3] phi() [ ] ( )
|
||||
main: scope:[main] from @31
|
||||
main: scope:[main] from @32
|
||||
[4] *((const byte*) BGCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 5 [ ] ( main:2 [ ] )
|
||||
[5] call print_cls [ ] ( main:2 [ ] )
|
||||
to:main::@1
|
||||
@ -4718,15 +4718,15 @@ INITIAL ASM
|
||||
.label print_line_cursor = 5
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @31 [phi:@begin->@31]
|
||||
b31_from_bbegin:
|
||||
jmp b31
|
||||
//SEG4 @31
|
||||
b31:
|
||||
//SEG3 [1] phi from @begin to @32 [phi:@begin->@32]
|
||||
b32_from_bbegin:
|
||||
jmp b32
|
||||
//SEG4 @32
|
||||
b32:
|
||||
//SEG5 [2] call main [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @31 to @end [phi:@31->@end]
|
||||
bend_from_b31:
|
||||
//SEG6 [3] phi from @32 to @end [phi:@32->@end]
|
||||
bend_from_b32:
|
||||
jmp bend
|
||||
//SEG7 @end
|
||||
bend:
|
||||
@ -7306,15 +7306,15 @@ ASSEMBLER BEFORE OPTIMIZATION
|
||||
.label print_line_cursor = 4
|
||||
//SEG2 @begin
|
||||
bbegin:
|
||||
//SEG3 [1] phi from @begin to @31 [phi:@begin->@31]
|
||||
b31_from_bbegin:
|
||||
jmp b31
|
||||
//SEG4 @31
|
||||
b31:
|
||||
//SEG3 [1] phi from @begin to @32 [phi:@begin->@32]
|
||||
b32_from_bbegin:
|
||||
jmp b32
|
||||
//SEG4 @32
|
||||
b32:
|
||||
//SEG5 [2] call main [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @31 to @end [phi:@31->@end]
|
||||
bend_from_b31:
|
||||
//SEG6 [3] phi from @32 to @end [phi:@32->@end]
|
||||
bend_from_b32:
|
||||
jmp bend
|
||||
//SEG7 @end
|
||||
bend:
|
||||
@ -9248,7 +9248,7 @@ print_cls: {
|
||||
mula_sqr2_hi: .fill $200, 0
|
||||
|
||||
ASSEMBLER OPTIMIZATIONS
|
||||
Removing instruction jmp b31
|
||||
Removing instruction jmp b32
|
||||
Removing instruction jmp bend
|
||||
Removing instruction jmp b1
|
||||
Removing instruction jmp b2
|
||||
@ -9416,8 +9416,8 @@ Replacing label b3_from_b4 with b3
|
||||
Replacing label b1_from_b1 with b1
|
||||
Replacing label b1_from_b1 with b1
|
||||
Removing instruction bbegin:
|
||||
Removing instruction b31_from_bbegin:
|
||||
Removing instruction bend_from_b31:
|
||||
Removing instruction b32_from_bbegin:
|
||||
Removing instruction bend_from_b32:
|
||||
Removing instruction b1_from_main:
|
||||
Removing instruction mulf_init_from_b1:
|
||||
Removing instruction b2_from_b1:
|
||||
@ -9512,7 +9512,7 @@ Removing instruction b12_from_b3:
|
||||
Removing instruction b4_from_b12:
|
||||
Removing instruction b1_from_b1:
|
||||
Succesful ASM optimization Pass5RedundantLabelElimination
|
||||
Removing instruction b31:
|
||||
Removing instruction b32:
|
||||
Removing instruction bend:
|
||||
Removing instruction print_cls_from_main:
|
||||
Removing instruction b1:
|
||||
@ -9675,7 +9675,7 @@ Removing unreachable instruction jmp b4
|
||||
Succesful ASM optimization Pass5UnreachableCodeElimination
|
||||
|
||||
FINAL SYMBOL TABLE
|
||||
(label) @31
|
||||
(label) @32
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
@ -10168,11 +10168,11 @@ Score: 224322
|
||||
.label print_char_cursor = $a
|
||||
.label print_line_cursor = 4
|
||||
//SEG2 @begin
|
||||
//SEG3 [1] phi from @begin to @31 [phi:@begin->@31]
|
||||
//SEG4 @31
|
||||
//SEG3 [1] phi from @begin to @32 [phi:@begin->@32]
|
||||
//SEG4 @32
|
||||
//SEG5 [2] call main [ ] ( )
|
||||
jsr main
|
||||
//SEG6 [3] phi from @31 to @end [phi:@31->@end]
|
||||
//SEG6 [3] phi from @32 to @end [phi:@32->@end]
|
||||
//SEG7 @end
|
||||
//SEG8 main
|
||||
main: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
(label) @31
|
||||
(label) @32
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) BGCOL
|
||||
|
Loading…
Reference in New Issue
Block a user