mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-08 14:37:40 +00:00
Fixed test data.
This commit is contained in:
parent
f6ee599d79
commit
839911e0a0
@ -166,13 +166,15 @@ printf_char: {
|
||||
bne !+
|
||||
inc.z printf_char_cursor+1
|
||||
!:
|
||||
// if(printf_char_cursor==printf_screen+PRINTF_SCREEN_BYTES)
|
||||
// if(printf_char_cursor>=(printf_screen+PRINTF_SCREEN_BYTES))
|
||||
lda.z printf_char_cursor+1
|
||||
cmp #>printf_screen+$28*$19
|
||||
bne __breturn
|
||||
bcc __breturn
|
||||
bne !+
|
||||
lda.z printf_char_cursor
|
||||
cmp #<printf_screen+$28*$19
|
||||
bne __breturn
|
||||
bcc __breturn
|
||||
!:
|
||||
// memcpy(printf_screen, printf_screen+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH)
|
||||
jsr memcpy
|
||||
// memset(printf_screen+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH)
|
||||
@ -292,28 +294,62 @@ memcpy: {
|
||||
jmp __b1
|
||||
}
|
||||
// Print a zero-terminated string
|
||||
// Handles escape codes such as newline
|
||||
// printf_str(byte* zp(3) str)
|
||||
printf_str: {
|
||||
.label str = 3
|
||||
__b1:
|
||||
// while(*str)
|
||||
ldy #0
|
||||
lda (str),y
|
||||
cmp #0
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// printf_char(*str++)
|
||||
// ch = *str++
|
||||
ldy #0
|
||||
lda (str),y
|
||||
jsr printf_char
|
||||
// printf_char(*str++);
|
||||
inc.z str
|
||||
bne !+
|
||||
inc.z str+1
|
||||
!:
|
||||
jmp __b1
|
||||
// if(ch==0)
|
||||
cmp #0
|
||||
bne __b3
|
||||
// }
|
||||
rts
|
||||
__b3:
|
||||
// if(ch=='\n')
|
||||
cmp #'\n'
|
||||
beq __b4
|
||||
// printf_char(ch)
|
||||
jsr printf_char
|
||||
jmp __b2
|
||||
__b4:
|
||||
// printf_ln()
|
||||
jsr printf_ln
|
||||
jmp __b2
|
||||
}
|
||||
// Print a newline
|
||||
printf_ln: {
|
||||
__b1:
|
||||
// printf_line_cursor += PRINTF_SCREEN_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z printf_line_cursor
|
||||
sta.z printf_line_cursor
|
||||
bcc !+
|
||||
inc.z printf_line_cursor+1
|
||||
!:
|
||||
// while (printf_line_cursor<printf_char_cursor)
|
||||
lda.z printf_line_cursor+1
|
||||
cmp.z printf_char_cursor+1
|
||||
bcc __b1
|
||||
bne !+
|
||||
lda.z printf_line_cursor
|
||||
cmp.z printf_char_cursor
|
||||
bcc __b1
|
||||
!:
|
||||
// printf_char_cursor = printf_line_cursor
|
||||
lda.z printf_line_cursor
|
||||
sta.z printf_char_cursor
|
||||
lda.z printf_line_cursor+1
|
||||
sta.z printf_char_cursor+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Computes the length of the string str up to but not including the terminating null character.
|
||||
// strlen(byte* zp(9) str)
|
||||
@ -345,34 +381,6 @@ strlen: {
|
||||
!:
|
||||
jmp __b1
|
||||
}
|
||||
// Print a newline
|
||||
printf_ln: {
|
||||
__b1:
|
||||
// printf_line_cursor += PRINTF_SCREEN_WIDTH
|
||||
lda #$28
|
||||
clc
|
||||
adc.z printf_line_cursor
|
||||
sta.z printf_line_cursor
|
||||
bcc !+
|
||||
inc.z printf_line_cursor+1
|
||||
!:
|
||||
// while (printf_line_cursor<printf_char_cursor)
|
||||
lda.z printf_line_cursor+1
|
||||
cmp.z printf_char_cursor+1
|
||||
bcc __b1
|
||||
bne !+
|
||||
lda.z printf_line_cursor
|
||||
cmp.z printf_char_cursor
|
||||
bcc __b1
|
||||
!:
|
||||
// printf_char_cursor = printf_line_cursor
|
||||
lda.z printf_line_cursor
|
||||
sta.z printf_char_cursor
|
||||
lda.z printf_line_cursor+1
|
||||
sta.z printf_char_cursor+1
|
||||
// }
|
||||
rts
|
||||
}
|
||||
// Clear the screen. Also resets current line/char cursor.
|
||||
printf_cls: {
|
||||
// memset(printf_screen, ' ', PRINTF_SCREEN_BYTES)
|
||||
|
@ -118,11 +118,11 @@ printf_padding::@3: scope:[printf_padding] from printf_padding::@2
|
||||
to:printf_padding::@1
|
||||
|
||||
(void()) printf_char((byte) printf_char::ch)
|
||||
printf_char: scope:[printf_char] from printf_padding::@2 printf_str::@2
|
||||
[51] (byte) printf_char::ch#2 ← phi( printf_padding::@2/(byte) printf_char::ch#0 printf_str::@2/(byte) printf_char::ch#1 )
|
||||
printf_char: scope:[printf_char] from printf_padding::@2 printf_str::@5
|
||||
[51] (byte) printf_char::ch#2 ← phi( printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
|
||||
[52] *((byte*) printf_char_cursor) ← (byte) printf_char::ch#2
|
||||
[53] (byte*) printf_char_cursor ← ++ (byte*) printf_char_cursor
|
||||
[54] if((byte*) printf_char_cursor!=(const byte*) printf_screen+(word)(number) $28*(number) $19) goto printf_char::@return
|
||||
[54] if((byte*) printf_char_cursor<(const byte*) printf_screen+(word)(number) $28*(number) $19) goto printf_char::@return
|
||||
to:printf_char::@1
|
||||
printf_char::@1: scope:[printf_char] from printf_char
|
||||
[55] phi()
|
||||
@ -186,62 +186,71 @@ memcpy::@2: scope:[memcpy] from memcpy::@1
|
||||
printf_str: scope:[printf_str] from printf_string::@2
|
||||
[79] phi()
|
||||
to:printf_str::@1
|
||||
printf_str::@1: scope:[printf_str] from printf_str printf_str::@3
|
||||
[80] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@3/(byte*) printf_str::str#0 )
|
||||
[81] if((byte) 0!=*((byte*) printf_str::str#2)) goto printf_str::@2
|
||||
to:printf_str::@return
|
||||
printf_str::@return: scope:[printf_str] from printf_str::@1
|
||||
[82] return
|
||||
to:@return
|
||||
printf_str::@1: scope:[printf_str] from printf_str printf_str::@4 printf_str::@5
|
||||
[80] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
|
||||
to:printf_str::@2
|
||||
printf_str::@2: scope:[printf_str] from printf_str::@1
|
||||
[83] (byte) printf_char::ch#1 ← *((byte*) printf_str::str#2)
|
||||
[84] call printf_char
|
||||
to:printf_str::@3
|
||||
[81] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
|
||||
[82] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
|
||||
[83] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
|
||||
to:printf_str::@return
|
||||
printf_str::@return: scope:[printf_str] from printf_str::@2
|
||||
[84] return
|
||||
to:@return
|
||||
printf_str::@3: scope:[printf_str] from printf_str::@2
|
||||
[85] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
|
||||
[85] if((byte) printf_str::ch#0==(byte) '
|
||||
') goto printf_str::@4
|
||||
to:printf_str::@5
|
||||
printf_str::@5: scope:[printf_str] from printf_str::@3
|
||||
[86] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
|
||||
[87] call printf_char
|
||||
to:printf_str::@1
|
||||
printf_str::@4: scope:[printf_str] from printf_str::@3
|
||||
[88] phi()
|
||||
[89] call printf_ln
|
||||
to:printf_str::@1
|
||||
|
||||
(void()) printf_ln()
|
||||
printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6 printf_str::@4
|
||||
[90] phi()
|
||||
to:printf_ln::@1
|
||||
printf_ln::@1: scope:[printf_ln] from printf_ln printf_ln::@1
|
||||
[91] (byte*) printf_line_cursor ← (byte*) printf_line_cursor + (byte) $28
|
||||
[92] if((byte*) printf_line_cursor<(byte*) printf_char_cursor) goto printf_ln::@1
|
||||
to:printf_ln::@2
|
||||
printf_ln::@2: scope:[printf_ln] from printf_ln::@1
|
||||
[93] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
to:printf_ln::@return
|
||||
printf_ln::@return: scope:[printf_ln] from printf_ln::@2
|
||||
[94] return
|
||||
to:@return
|
||||
|
||||
(word()) strlen((byte*) strlen::str)
|
||||
strlen: scope:[strlen] from printf_string::@3
|
||||
[86] phi()
|
||||
[95] phi()
|
||||
to:strlen::@1
|
||||
strlen::@1: scope:[strlen] from strlen strlen::@2
|
||||
[87] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
|
||||
[87] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
|
||||
[88] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
|
||||
[96] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
|
||||
[96] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
|
||||
[97] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
|
||||
to:strlen::@return
|
||||
strlen::@return: scope:[strlen] from strlen::@1
|
||||
[89] return
|
||||
[98] return
|
||||
to:@return
|
||||
strlen::@2: scope:[strlen] from strlen::@1
|
||||
[90] (word) strlen::len#1 ← ++ (word) strlen::len#2
|
||||
[91] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
|
||||
[99] (word) strlen::len#1 ← ++ (word) strlen::len#2
|
||||
[100] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
|
||||
to:strlen::@1
|
||||
|
||||
(void()) printf_ln()
|
||||
printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6
|
||||
[92] phi()
|
||||
to:printf_ln::@1
|
||||
printf_ln::@1: scope:[printf_ln] from printf_ln printf_ln::@1
|
||||
[93] (byte*) printf_line_cursor ← (byte*) printf_line_cursor + (byte) $28
|
||||
[94] if((byte*) printf_line_cursor<(byte*) printf_char_cursor) goto printf_ln::@1
|
||||
to:printf_ln::@2
|
||||
printf_ln::@2: scope:[printf_ln] from printf_ln::@1
|
||||
[95] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
to:printf_ln::@return
|
||||
printf_ln::@return: scope:[printf_ln] from printf_ln::@2
|
||||
[96] return
|
||||
to:@return
|
||||
|
||||
(void()) printf_cls()
|
||||
printf_cls: scope:[printf_cls] from main
|
||||
[97] phi()
|
||||
[98] call memset
|
||||
[101] phi()
|
||||
[102] call memset
|
||||
to:printf_cls::@1
|
||||
printf_cls::@1: scope:[printf_cls] from printf_cls
|
||||
[99] (byte*) printf_line_cursor ← (const byte*) printf_screen
|
||||
[100] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
[103] (byte*) printf_line_cursor ← (const byte*) printf_screen
|
||||
[104] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
to:printf_cls::@return
|
||||
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
|
||||
[101] return
|
||||
[105] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@
|
||||
(byte) printf_char::ch#0 reg byte a 20002.0
|
||||
(byte) printf_char::ch#1 reg byte a 20002.0
|
||||
(byte) printf_char::ch#2 reg byte a 120003.0
|
||||
(byte*) printf_char_cursor loadstore zp[2]:15 10465.85074626866
|
||||
(byte*) printf_char_cursor loadstore zp[2]:15 25353.69014084507
|
||||
(void()) printf_cls()
|
||||
(label) printf_cls::@1
|
||||
(label) printf_cls::@return
|
||||
@ -77,7 +77,7 @@
|
||||
(byte) printf_format_number::zero_padding
|
||||
(byte) printf_format_string::justify_left
|
||||
(byte) printf_format_string::min_length
|
||||
(byte*) printf_line_cursor loadstore zp[2]:13 1639.825396825397
|
||||
(byte*) printf_line_cursor loadstore zp[2]:13 47764.31343283582
|
||||
(void()) printf_ln()
|
||||
(label) printf_ln::@1
|
||||
(label) printf_ln::@2
|
||||
@ -101,11 +101,15 @@
|
||||
(label) printf_str::@1
|
||||
(label) printf_str::@2
|
||||
(label) printf_str::@3
|
||||
(label) printf_str::@4
|
||||
(label) printf_str::@5
|
||||
(label) printf_str::@return
|
||||
(byte) printf_str::ch
|
||||
(byte) printf_str::ch#0 reg byte a 10001.0
|
||||
(byte*) printf_str::str
|
||||
(byte*) printf_str::str#0 str zp[2]:3 20002.0
|
||||
(byte*) printf_str::str#0 str zp[2]:3 4286.142857142857
|
||||
(byte*) printf_str::str#1 str zp[2]:3 551.0
|
||||
(byte*) printf_str::str#2 str zp[2]:3 10251.25
|
||||
(byte*) printf_str::str#2 str zp[2]:3 20502.5
|
||||
(void()) printf_string((byte*) printf_string::str , (byte) printf_string::format_min_length , (byte) printf_string::format_justify_left)
|
||||
(word~) printf_string::$9 zp[2]:11 101.0
|
||||
(label) printf_string::@1
|
||||
@ -157,3 +161,4 @@ zp[2]:11 [ strlen::len#2 strlen::len#1 strlen::return#2 printf_string::$9 memcpy
|
||||
zp[2]:13 [ printf_line_cursor ]
|
||||
zp[2]:15 [ printf_char_cursor printf_char::$8 ]
|
||||
reg byte a [ printf_string::len#0 ]
|
||||
reg byte a [ printf_str::ch#0 ]
|
||||
|
@ -255,13 +255,15 @@ printf_char: {
|
||||
bne !+
|
||||
inc.z printf_char_cursor+1
|
||||
!:
|
||||
// if(printf_char_cursor==printf_screen+PRINTF_SCREEN_BYTES)
|
||||
// if(printf_char_cursor>=(printf_screen+PRINTF_SCREEN_BYTES))
|
||||
lda.z printf_char_cursor+1
|
||||
cmp #>printf_screen+$28*$19
|
||||
bne __breturn
|
||||
bcc __breturn
|
||||
bne !+
|
||||
lda.z printf_char_cursor
|
||||
cmp #<printf_screen+$28*$19
|
||||
bne __breturn
|
||||
bcc __breturn
|
||||
!:
|
||||
// memcpy(printf_screen, printf_screen+PRINTF_SCREEN_WIDTH, PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH)
|
||||
jsr memcpy
|
||||
// memset(printf_screen+PRINTF_SCREEN_BYTES-PRINTF_SCREEN_WIDTH, ' ', PRINTF_SCREEN_WIDTH)
|
||||
@ -381,28 +383,34 @@ memcpy: {
|
||||
jmp __b1
|
||||
}
|
||||
// Print a zero-terminated string
|
||||
// Handles escape codes such as newline
|
||||
// printf_str(byte* zp(4) str)
|
||||
printf_str: {
|
||||
.label str = 4
|
||||
__b1:
|
||||
// while(*str)
|
||||
ldy #0
|
||||
lda (str),y
|
||||
cmp #0
|
||||
bne __b2
|
||||
// }
|
||||
rts
|
||||
__b2:
|
||||
// printf_char(*str++)
|
||||
// ch = *str++
|
||||
ldy #0
|
||||
lda (str),y
|
||||
jsr printf_char
|
||||
// printf_char(*str++);
|
||||
inc.z str
|
||||
bne !+
|
||||
inc.z str+1
|
||||
!:
|
||||
jmp __b1
|
||||
// if(ch==0)
|
||||
cmp #0
|
||||
bne __b3
|
||||
// }
|
||||
rts
|
||||
__b3:
|
||||
// if(ch=='\n')
|
||||
cmp #'\n'
|
||||
beq __b4
|
||||
// printf_char(ch)
|
||||
jsr printf_char
|
||||
jmp __b2
|
||||
__b4:
|
||||
// printf_ln()
|
||||
jsr printf_ln
|
||||
jmp __b2
|
||||
}
|
||||
// Computes the length of the string str up to but not including the terminating null character.
|
||||
// strlen(byte* zp(6) str)
|
||||
|
@ -46,7 +46,7 @@ main::@return: scope:[main] from main::@6
|
||||
to:@return
|
||||
|
||||
(void()) printf_ln()
|
||||
printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6
|
||||
printf_ln: scope:[printf_ln] from main::@2 main::@4 main::@6 printf_str::@4
|
||||
[21] phi()
|
||||
to:printf_ln::@1
|
||||
printf_ln::@1: scope:[printf_ln] from printf_ln printf_ln::@1
|
||||
@ -179,11 +179,11 @@ printf_padding::@3: scope:[printf_padding] from printf_padding::@2
|
||||
to:printf_padding::@1
|
||||
|
||||
(void()) printf_char((byte) printf_char::ch)
|
||||
printf_char: scope:[printf_char] from printf_number_buffer::@8 printf_padding::@2 printf_str::@2
|
||||
[73] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@8/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@2/(byte) printf_char::ch#1 )
|
||||
printf_char: scope:[printf_char] from printf_number_buffer::@8 printf_padding::@2 printf_str::@5
|
||||
[73] (byte) printf_char::ch#3 ← phi( printf_number_buffer::@8/(byte) printf_char::ch#2 printf_padding::@2/(byte) printf_char::ch#0 printf_str::@5/(byte) printf_char::ch#1 )
|
||||
[74] *((byte*) printf_char_cursor) ← (byte) printf_char::ch#3
|
||||
[75] (byte*) printf_char_cursor ← ++ (byte*) printf_char_cursor
|
||||
[76] if((byte*) printf_char_cursor!=(const byte*) printf_screen+(word)(number) $28*(number) $19) goto printf_char::@return
|
||||
[76] if((byte*) printf_char_cursor<(const byte*) printf_screen+(word)(number) $28*(number) $19) goto printf_char::@return
|
||||
to:printf_char::@1
|
||||
printf_char::@1: scope:[printf_char] from printf_char
|
||||
[77] phi()
|
||||
@ -247,231 +247,240 @@ memcpy::@2: scope:[memcpy] from memcpy::@1
|
||||
printf_str: scope:[printf_str] from printf_number_buffer::@4
|
||||
[101] phi()
|
||||
to:printf_str::@1
|
||||
printf_str::@1: scope:[printf_str] from printf_str printf_str::@3
|
||||
[102] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@3/(byte*) printf_str::str#0 )
|
||||
[103] if((byte) 0!=*((byte*) printf_str::str#2)) goto printf_str::@2
|
||||
to:printf_str::@return
|
||||
printf_str::@return: scope:[printf_str] from printf_str::@1
|
||||
[104] return
|
||||
to:@return
|
||||
printf_str::@1: scope:[printf_str] from printf_str printf_str::@4 printf_str::@5
|
||||
[102] (byte*) printf_str::str#2 ← phi( printf_str/(byte*) printf_str::str#1 printf_str::@4/(byte*) printf_str::str#0 printf_str::@5/(byte*) printf_str::str#0 )
|
||||
to:printf_str::@2
|
||||
printf_str::@2: scope:[printf_str] from printf_str::@1
|
||||
[105] (byte) printf_char::ch#1 ← *((byte*) printf_str::str#2)
|
||||
[106] call printf_char
|
||||
to:printf_str::@3
|
||||
[103] (byte) printf_str::ch#0 ← *((byte*) printf_str::str#2)
|
||||
[104] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
|
||||
[105] if((byte) printf_str::ch#0!=(byte) 0) goto printf_str::@3
|
||||
to:printf_str::@return
|
||||
printf_str::@return: scope:[printf_str] from printf_str::@2
|
||||
[106] return
|
||||
to:@return
|
||||
printf_str::@3: scope:[printf_str] from printf_str::@2
|
||||
[107] (byte*) printf_str::str#0 ← ++ (byte*) printf_str::str#2
|
||||
[107] if((byte) printf_str::ch#0==(byte) '
|
||||
') goto printf_str::@4
|
||||
to:printf_str::@5
|
||||
printf_str::@5: scope:[printf_str] from printf_str::@3
|
||||
[108] (byte) printf_char::ch#1 ← (byte) printf_str::ch#0
|
||||
[109] call printf_char
|
||||
to:printf_str::@1
|
||||
printf_str::@4: scope:[printf_str] from printf_str::@3
|
||||
[110] phi()
|
||||
[111] call printf_ln
|
||||
to:printf_str::@1
|
||||
|
||||
(word()) strlen((byte*) strlen::str)
|
||||
strlen: scope:[strlen] from printf_number_buffer::@5
|
||||
[108] phi()
|
||||
[112] phi()
|
||||
to:strlen::@1
|
||||
strlen::@1: scope:[strlen] from strlen strlen::@2
|
||||
[109] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
|
||||
[109] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
|
||||
[110] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
|
||||
[113] (word) strlen::len#2 ← phi( strlen/(word) 0 strlen::@2/(word) strlen::len#1 )
|
||||
[113] (byte*) strlen::str#2 ← phi( strlen/(byte*) strlen::str#1 strlen::@2/(byte*) strlen::str#0 )
|
||||
[114] if((byte) 0!=*((byte*) strlen::str#2)) goto strlen::@2
|
||||
to:strlen::@return
|
||||
strlen::@return: scope:[strlen] from strlen::@1
|
||||
[111] return
|
||||
[115] return
|
||||
to:@return
|
||||
strlen::@2: scope:[strlen] from strlen::@1
|
||||
[112] (word) strlen::len#1 ← ++ (word) strlen::len#2
|
||||
[113] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
|
||||
[116] (word) strlen::len#1 ← ++ (word) strlen::len#2
|
||||
[117] (byte*) strlen::str#0 ← ++ (byte*) strlen::str#2
|
||||
to:strlen::@1
|
||||
|
||||
(void()) utoa((word) utoa::value , (byte*) utoa::buffer , (byte) utoa::radix)
|
||||
utoa: scope:[utoa] from printf_uint::@1
|
||||
[114] phi()
|
||||
[118] phi()
|
||||
to:utoa::@1
|
||||
utoa::@1: scope:[utoa] from utoa utoa::@4
|
||||
[115] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
||||
[115] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
|
||||
[115] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(const word) printf_uint::uvalue#0 )
|
||||
[115] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
|
||||
[116] if((byte) utoa::digit#2<(const byte) utoa::max_digits#2-(byte) 1) goto utoa::@2
|
||||
[119] (byte*) utoa::buffer#11 ← phi( utoa::@4/(byte*) utoa::buffer#14 utoa/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
||||
[119] (byte) utoa::started#2 ← phi( utoa::@4/(byte) utoa::started#4 utoa/(byte) 0 )
|
||||
[119] (word) utoa::value#2 ← phi( utoa::@4/(word) utoa::value#6 utoa/(const word) printf_uint::uvalue#0 )
|
||||
[119] (byte) utoa::digit#2 ← phi( utoa::@4/(byte) utoa::digit#1 utoa/(byte) 0 )
|
||||
[120] if((byte) utoa::digit#2<(const byte) utoa::max_digits#2-(byte) 1) goto utoa::@2
|
||||
to:utoa::@3
|
||||
utoa::@3: scope:[utoa] from utoa::@1
|
||||
[117] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
|
||||
[118] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
|
||||
[119] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
|
||||
[120] *((byte*) utoa::buffer#3) ← (byte) 0
|
||||
[121] (byte~) utoa::$11 ← (byte)(word) utoa::value#2
|
||||
[122] *((byte*) utoa::buffer#11) ← *((const byte*) DIGITS + (byte~) utoa::$11)
|
||||
[123] (byte*) utoa::buffer#3 ← ++ (byte*) utoa::buffer#11
|
||||
[124] *((byte*) utoa::buffer#3) ← (byte) 0
|
||||
to:utoa::@return
|
||||
utoa::@return: scope:[utoa] from utoa::@3
|
||||
[121] return
|
||||
[125] return
|
||||
to:@return
|
||||
utoa::@2: scope:[utoa] from utoa::@1
|
||||
[122] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
|
||||
[123] (word) utoa::digit_value#0 ← *((const word*) RADIX_HEXADECIMAL_VALUES + (byte~) utoa::$10)
|
||||
[124] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
|
||||
[126] (byte~) utoa::$10 ← (byte) utoa::digit#2 << (byte) 1
|
||||
[127] (word) utoa::digit_value#0 ← *((const word*) RADIX_HEXADECIMAL_VALUES + (byte~) utoa::$10)
|
||||
[128] if((byte) 0!=(byte) utoa::started#2) goto utoa::@5
|
||||
to:utoa::@7
|
||||
utoa::@7: scope:[utoa] from utoa::@2
|
||||
[125] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
|
||||
[129] if((word) utoa::value#2>=(word) utoa::digit_value#0) goto utoa::@5
|
||||
to:utoa::@4
|
||||
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
|
||||
[126] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
|
||||
[126] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
|
||||
[126] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
|
||||
[127] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
|
||||
[130] (byte*) utoa::buffer#14 ← phi( utoa::@7/(byte*) utoa::buffer#11 utoa::@6/(byte*) utoa::buffer#4 )
|
||||
[130] (byte) utoa::started#4 ← phi( utoa::@7/(byte) utoa::started#2 utoa::@6/(byte) 1 )
|
||||
[130] (word) utoa::value#6 ← phi( utoa::@7/(word) utoa::value#2 utoa::@6/(word) utoa::value#0 )
|
||||
[131] (byte) utoa::digit#1 ← ++ (byte) utoa::digit#2
|
||||
to:utoa::@1
|
||||
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
|
||||
[128] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
|
||||
[129] (word) utoa_append::value#0 ← (word) utoa::value#2
|
||||
[130] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
|
||||
[131] call utoa_append
|
||||
[132] (word) utoa_append::return#0 ← (word) utoa_append::value#2
|
||||
[132] (byte*) utoa_append::buffer#0 ← (byte*) utoa::buffer#11
|
||||
[133] (word) utoa_append::value#0 ← (word) utoa::value#2
|
||||
[134] (word) utoa_append::sub#0 ← (word) utoa::digit_value#0
|
||||
[135] call utoa_append
|
||||
[136] (word) utoa_append::return#0 ← (word) utoa_append::value#2
|
||||
to:utoa::@6
|
||||
utoa::@6: scope:[utoa] from utoa::@5
|
||||
[133] (word) utoa::value#0 ← (word) utoa_append::return#0
|
||||
[134] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
|
||||
[137] (word) utoa::value#0 ← (word) utoa_append::return#0
|
||||
[138] (byte*) utoa::buffer#4 ← ++ (byte*) utoa::buffer#11
|
||||
to:utoa::@4
|
||||
|
||||
(word()) utoa_append((byte*) utoa_append::buffer , (word) utoa_append::value , (word) utoa_append::sub)
|
||||
utoa_append: scope:[utoa_append] from utoa::@5
|
||||
[135] phi()
|
||||
[139] phi()
|
||||
to:utoa_append::@1
|
||||
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
|
||||
[136] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
|
||||
[136] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
|
||||
[137] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
|
||||
[140] (byte) utoa_append::digit#2 ← phi( utoa_append/(byte) 0 utoa_append::@2/(byte) utoa_append::digit#1 )
|
||||
[140] (word) utoa_append::value#2 ← phi( utoa_append/(word) utoa_append::value#0 utoa_append::@2/(word) utoa_append::value#1 )
|
||||
[141] if((word) utoa_append::value#2>=(word) utoa_append::sub#0) goto utoa_append::@2
|
||||
to:utoa_append::@3
|
||||
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
|
||||
[138] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
|
||||
[142] *((byte*) utoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) utoa_append::digit#2)
|
||||
to:utoa_append::@return
|
||||
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
|
||||
[139] return
|
||||
[143] return
|
||||
to:@return
|
||||
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
|
||||
[140] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
|
||||
[141] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
|
||||
[144] (byte) utoa_append::digit#1 ← ++ (byte) utoa_append::digit#2
|
||||
[145] (word) utoa_append::value#1 ← (word) utoa_append::value#2 - (word) utoa_append::sub#0
|
||||
to:utoa_append::@1
|
||||
|
||||
(void()) printf_schar((signed byte) printf_schar::value , (byte) printf_schar::format_min_length , (byte) printf_schar::format_justify_left , (byte) printf_schar::format_sign_always , (byte) printf_schar::format_zero_padding , (byte) printf_schar::format_radix)
|
||||
printf_schar: scope:[printf_schar] from main::@1 main::@3
|
||||
[142] (byte) printf_schar::format_zero_padding#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
|
||||
[142] (byte) printf_schar::format_radix#2 ← phi( main::@1/(const byte) DECIMAL main::@3/(const byte) OCTAL )
|
||||
[142] (byte) printf_schar::format_sign_always#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
|
||||
[142] (signed byte) printf_schar::value#3 ← phi( main::@1/(signed byte) -$4d main::@3/(signed byte) $63 )
|
||||
[143] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
|
||||
[144] if((signed byte) printf_schar::value#3<(signed byte) 0) goto printf_schar::@1
|
||||
[146] (byte) printf_schar::format_zero_padding#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
|
||||
[146] (byte) printf_schar::format_radix#2 ← phi( main::@1/(const byte) DECIMAL main::@3/(const byte) OCTAL )
|
||||
[146] (byte) printf_schar::format_sign_always#2 ← phi( main::@1/(byte) 0 main::@3/(byte) 1 )
|
||||
[146] (signed byte) printf_schar::value#3 ← phi( main::@1/(signed byte) -$4d main::@3/(signed byte) $63 )
|
||||
[147] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) 0
|
||||
[148] if((signed byte) printf_schar::value#3<(signed byte) 0) goto printf_schar::@1
|
||||
to:printf_schar::@3
|
||||
printf_schar::@3: scope:[printf_schar] from printf_schar
|
||||
[145] if((byte) 0==(byte) printf_schar::format_sign_always#2) goto printf_schar::@2
|
||||
[149] if((byte) 0==(byte) printf_schar::format_sign_always#2) goto printf_schar::@2
|
||||
to:printf_schar::@4
|
||||
printf_schar::@4: scope:[printf_schar] from printf_schar::@3
|
||||
[146] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
|
||||
[150] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '+'
|
||||
to:printf_schar::@2
|
||||
printf_schar::@2: scope:[printf_schar] from printf_schar::@1 printf_schar::@3 printf_schar::@4
|
||||
[147] (signed byte) printf_schar::value#5 ← phi( printf_schar::@1/(signed byte) printf_schar::value#0 printf_schar::@3/(signed byte) printf_schar::value#3 printf_schar::@4/(signed byte) printf_schar::value#3 )
|
||||
[148] (byte) uctoa::value#1 ← (byte)(signed byte) printf_schar::value#5
|
||||
[149] (byte) uctoa::radix#0 ← (byte) printf_schar::format_radix#2
|
||||
[150] call uctoa
|
||||
[151] (signed byte) printf_schar::value#5 ← phi( printf_schar::@1/(signed byte) printf_schar::value#0 printf_schar::@3/(signed byte) printf_schar::value#3 printf_schar::@4/(signed byte) printf_schar::value#3 )
|
||||
[152] (byte) uctoa::value#1 ← (byte)(signed byte) printf_schar::value#5
|
||||
[153] (byte) uctoa::radix#0 ← (byte) printf_schar::format_radix#2
|
||||
[154] call uctoa
|
||||
to:printf_schar::@5
|
||||
printf_schar::@5: scope:[printf_schar] from printf_schar::@2
|
||||
[151] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
|
||||
[152] (byte) printf_number_buffer::format_zero_padding#1 ← (byte) printf_schar::format_zero_padding#2
|
||||
[153] call printf_number_buffer
|
||||
[155] (byte) printf_number_buffer::buffer_sign#1 ← *((byte*)&(struct printf_buffer_number) printf_buffer)
|
||||
[156] (byte) printf_number_buffer::format_zero_padding#1 ← (byte) printf_schar::format_zero_padding#2
|
||||
[157] call printf_number_buffer
|
||||
to:printf_schar::@return
|
||||
printf_schar::@return: scope:[printf_schar] from printf_schar::@5
|
||||
[154] return
|
||||
[158] return
|
||||
to:@return
|
||||
printf_schar::@1: scope:[printf_schar] from printf_schar
|
||||
[155] (signed byte) printf_schar::value#0 ← - (signed byte) printf_schar::value#3
|
||||
[156] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
|
||||
[159] (signed byte) printf_schar::value#0 ← - (signed byte) printf_schar::value#3
|
||||
[160] *((byte*)&(struct printf_buffer_number) printf_buffer) ← (byte) '-'
|
||||
to:printf_schar::@2
|
||||
|
||||
(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix)
|
||||
uctoa: scope:[uctoa] from printf_schar::@2
|
||||
[157] if((byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1
|
||||
[161] if((byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1
|
||||
to:uctoa::@2
|
||||
uctoa::@2: scope:[uctoa] from uctoa
|
||||
[158] if((byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@1
|
||||
[162] if((byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@1
|
||||
to:uctoa::@3
|
||||
uctoa::@3: scope:[uctoa] from uctoa::@2
|
||||
[159] if((byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@1
|
||||
[163] if((byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@1
|
||||
to:uctoa::@4
|
||||
uctoa::@4: scope:[uctoa] from uctoa::@3
|
||||
[160] if((byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@1
|
||||
[164] if((byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@1
|
||||
to:uctoa::@5
|
||||
uctoa::@5: scope:[uctoa] from uctoa::@4
|
||||
[161] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) ← (byte) 'e'
|
||||
[162] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 1) ← (byte) 'r'
|
||||
[163] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 2) ← (byte) 'r'
|
||||
[164] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 3) ← (byte) 0
|
||||
[165] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS) ← (byte) 'e'
|
||||
[166] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 1) ← (byte) 'r'
|
||||
[167] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 2) ← (byte) 'r'
|
||||
[168] *((byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS+(byte) 3) ← (byte) 0
|
||||
to:uctoa::@return
|
||||
uctoa::@return: scope:[uctoa] from uctoa::@5 uctoa::@8
|
||||
[165] return
|
||||
[169] return
|
||||
to:@return
|
||||
uctoa::@1: scope:[uctoa] from uctoa uctoa::@2 uctoa::@3 uctoa::@4
|
||||
[166] (byte*) uctoa::digit_values#8 ← phi( uctoa/(const byte*) RADIX_DECIMAL_VALUES_CHAR uctoa::@2/(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR uctoa::@3/(const byte*) RADIX_OCTAL_VALUES_CHAR uctoa::@4/(const byte*) RADIX_BINARY_VALUES_CHAR )
|
||||
[166] (byte) uctoa::max_digits#7 ← phi( uctoa/(byte) 3 uctoa::@2/(byte) 2 uctoa::@3/(byte) 3 uctoa::@4/(byte) 8 )
|
||||
[170] (byte*) uctoa::digit_values#8 ← phi( uctoa/(const byte*) RADIX_DECIMAL_VALUES_CHAR uctoa::@2/(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR uctoa::@3/(const byte*) RADIX_OCTAL_VALUES_CHAR uctoa::@4/(const byte*) RADIX_BINARY_VALUES_CHAR )
|
||||
[170] (byte) uctoa::max_digits#7 ← phi( uctoa/(byte) 3 uctoa::@2/(byte) 2 uctoa::@3/(byte) 3 uctoa::@4/(byte) 8 )
|
||||
to:uctoa::@6
|
||||
uctoa::@6: scope:[uctoa] from uctoa::@1 uctoa::@9
|
||||
[167] (byte*) uctoa::buffer#11 ← phi( uctoa::@9/(byte*) uctoa::buffer#14 uctoa::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
||||
[167] (byte) uctoa::started#2 ← phi( uctoa::@9/(byte) uctoa::started#4 uctoa::@1/(byte) 0 )
|
||||
[167] (byte) uctoa::value#2 ← phi( uctoa::@9/(byte) uctoa::value#6 uctoa::@1/(byte) uctoa::value#1 )
|
||||
[167] (byte) uctoa::digit#2 ← phi( uctoa::@9/(byte) uctoa::digit#1 uctoa::@1/(byte) 0 )
|
||||
[168] (byte~) uctoa::$4 ← (byte) uctoa::max_digits#7 - (byte) 1
|
||||
[169] if((byte) uctoa::digit#2<(byte~) uctoa::$4) goto uctoa::@7
|
||||
[171] (byte*) uctoa::buffer#11 ← phi( uctoa::@9/(byte*) uctoa::buffer#14 uctoa::@1/(byte*)&(struct printf_buffer_number) printf_buffer+(const byte) OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
|
||||
[171] (byte) uctoa::started#2 ← phi( uctoa::@9/(byte) uctoa::started#4 uctoa::@1/(byte) 0 )
|
||||
[171] (byte) uctoa::value#2 ← phi( uctoa::@9/(byte) uctoa::value#6 uctoa::@1/(byte) uctoa::value#1 )
|
||||
[171] (byte) uctoa::digit#2 ← phi( uctoa::@9/(byte) uctoa::digit#1 uctoa::@1/(byte) 0 )
|
||||
[172] (byte~) uctoa::$4 ← (byte) uctoa::max_digits#7 - (byte) 1
|
||||
[173] if((byte) uctoa::digit#2<(byte~) uctoa::$4) goto uctoa::@7
|
||||
to:uctoa::@8
|
||||
uctoa::@8: scope:[uctoa] from uctoa::@6
|
||||
[170] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
|
||||
[171] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
|
||||
[172] *((byte*) uctoa::buffer#3) ← (byte) 0
|
||||
[174] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2)
|
||||
[175] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11
|
||||
[176] *((byte*) uctoa::buffer#3) ← (byte) 0
|
||||
to:uctoa::@return
|
||||
uctoa::@7: scope:[uctoa] from uctoa::@6
|
||||
[173] (byte) uctoa::digit_value#0 ← *((byte*) uctoa::digit_values#8 + (byte) uctoa::digit#2)
|
||||
[174] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@10
|
||||
[177] (byte) uctoa::digit_value#0 ← *((byte*) uctoa::digit_values#8 + (byte) uctoa::digit#2)
|
||||
[178] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@10
|
||||
to:uctoa::@12
|
||||
uctoa::@12: scope:[uctoa] from uctoa::@7
|
||||
[175] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@10
|
||||
[179] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@10
|
||||
to:uctoa::@9
|
||||
uctoa::@9: scope:[uctoa] from uctoa::@11 uctoa::@12
|
||||
[176] (byte*) uctoa::buffer#14 ← phi( uctoa::@12/(byte*) uctoa::buffer#11 uctoa::@11/(byte*) uctoa::buffer#4 )
|
||||
[176] (byte) uctoa::started#4 ← phi( uctoa::@12/(byte) uctoa::started#2 uctoa::@11/(byte) 1 )
|
||||
[176] (byte) uctoa::value#6 ← phi( uctoa::@12/(byte) uctoa::value#2 uctoa::@11/(byte) uctoa::value#0 )
|
||||
[177] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
|
||||
[180] (byte*) uctoa::buffer#14 ← phi( uctoa::@12/(byte*) uctoa::buffer#11 uctoa::@11/(byte*) uctoa::buffer#4 )
|
||||
[180] (byte) uctoa::started#4 ← phi( uctoa::@12/(byte) uctoa::started#2 uctoa::@11/(byte) 1 )
|
||||
[180] (byte) uctoa::value#6 ← phi( uctoa::@12/(byte) uctoa::value#2 uctoa::@11/(byte) uctoa::value#0 )
|
||||
[181] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2
|
||||
to:uctoa::@6
|
||||
uctoa::@10: scope:[uctoa] from uctoa::@12 uctoa::@7
|
||||
[178] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
|
||||
[179] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
|
||||
[180] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
|
||||
[181] call uctoa_append
|
||||
[182] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
|
||||
[182] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11
|
||||
[183] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2
|
||||
[184] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0
|
||||
[185] call uctoa_append
|
||||
[186] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2
|
||||
to:uctoa::@11
|
||||
uctoa::@11: scope:[uctoa] from uctoa::@10
|
||||
[183] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
|
||||
[184] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
|
||||
[187] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0
|
||||
[188] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11
|
||||
to:uctoa::@9
|
||||
|
||||
(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub)
|
||||
uctoa_append: scope:[uctoa_append] from uctoa::@10
|
||||
[185] phi()
|
||||
[189] phi()
|
||||
to:uctoa_append::@1
|
||||
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
|
||||
[186] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
|
||||
[186] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
|
||||
[187] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
|
||||
[190] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 )
|
||||
[190] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 )
|
||||
[191] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2
|
||||
to:uctoa_append::@3
|
||||
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
|
||||
[188] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
|
||||
[192] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2)
|
||||
to:uctoa_append::@return
|
||||
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
|
||||
[189] return
|
||||
[193] return
|
||||
to:@return
|
||||
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
|
||||
[190] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
|
||||
[191] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
|
||||
[194] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2
|
||||
[195] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0
|
||||
to:uctoa_append::@1
|
||||
|
||||
(void()) printf_cls()
|
||||
printf_cls: scope:[printf_cls] from main
|
||||
[192] phi()
|
||||
[193] call memset
|
||||
[196] phi()
|
||||
[197] call memset
|
||||
to:printf_cls::@1
|
||||
printf_cls::@1: scope:[printf_cls] from printf_cls
|
||||
[194] (byte*) printf_line_cursor ← (const byte*) printf_screen
|
||||
[195] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
[198] (byte*) printf_line_cursor ← (const byte*) printf_screen
|
||||
[199] (byte*) printf_char_cursor ← (byte*) printf_line_cursor
|
||||
to:printf_cls::@return
|
||||
printf_cls::@return: scope:[printf_cls] from printf_cls::@1
|
||||
[196] return
|
||||
[200] return
|
||||
to:@return
|
||||
|
File diff suppressed because one or more lines are too long
@ -77,7 +77,7 @@
|
||||
(byte) printf_char::ch#1 reg byte a 200002.0
|
||||
(byte) printf_char::ch#2 reg byte a 2002.0
|
||||
(byte) printf_char::ch#3 reg byte a 1201004.0
|
||||
(byte*) printf_char_cursor loadstore zp[2]:16 70719.31313131312
|
||||
(byte*) printf_char_cursor loadstore zp[2]:16 174758.36893203887
|
||||
(void()) printf_cls()
|
||||
(label) printf_cls::@1
|
||||
(label) printf_cls::@return
|
||||
@ -88,7 +88,7 @@
|
||||
(byte) printf_format_number::zero_padding
|
||||
(byte) printf_format_string::justify_left
|
||||
(byte) printf_format_string::min_length
|
||||
(byte*) printf_line_cursor loadstore zp[2]:14 10561.147368421056
|
||||
(byte*) printf_line_cursor loadstore zp[2]:14 323234.4343434343
|
||||
(void()) printf_ln()
|
||||
(label) printf_ln::@1
|
||||
(label) printf_ln::@2
|
||||
@ -180,11 +180,15 @@
|
||||
(label) printf_str::@1
|
||||
(label) printf_str::@2
|
||||
(label) printf_str::@3
|
||||
(label) printf_str::@4
|
||||
(label) printf_str::@5
|
||||
(label) printf_str::@return
|
||||
(byte) printf_str::ch
|
||||
(byte) printf_str::ch#0 reg byte a 100001.0
|
||||
(byte*) printf_str::str
|
||||
(byte*) printf_str::str#0 str zp[2]:4 200002.0
|
||||
(byte*) printf_str::str#0 str zp[2]:4 42857.57142857143
|
||||
(byte*) printf_str::str#1 str zp[2]:4 5501.0
|
||||
(byte*) printf_str::str#2 str zp[2]:4 102501.25
|
||||
(byte*) printf_str::str#2 str zp[2]:4 205002.5
|
||||
(void()) printf_uint((word) printf_uint::uvalue , (byte) printf_uint::format_min_length , (byte) printf_uint::format_justify_left , (byte) printf_uint::format_sign_always , (byte) printf_uint::format_zero_padding , (byte) printf_uint::format_radix)
|
||||
(label) printf_uint::@1
|
||||
(label) printf_uint::@2
|
||||
@ -343,6 +347,7 @@ reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ]
|
||||
reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ]
|
||||
zp[2]:14 [ printf_line_cursor ]
|
||||
zp[2]:16 [ printf_char_cursor printf_char::$8 ]
|
||||
reg byte a [ printf_str::ch#0 ]
|
||||
reg byte a [ utoa::$11 ]
|
||||
reg byte a [ utoa::$10 ]
|
||||
zp[2]:18 [ utoa::digit_value#0 utoa_append::sub#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user