diff options
Diffstat (limited to 'src/arch/x86/isa/insts/general_purpose/input_output/string_io.py')
-rw-r--r-- | src/arch/x86/isa/insts/general_purpose/input_output/string_io.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/input_output/string_io.py b/src/arch/x86/isa/insts/general_purpose/input_output/string_io.py index 1b4e086d2..29b722d66 100644 --- a/src/arch/x86/isa/insts/general_purpose/input_output/string_io.py +++ b/src/arch/x86/isa/insts/general_purpose/input_output/string_io.py @@ -70,6 +70,8 @@ def macroop INS_M_R { }; def macroop INS_E_M_R { + and t0, rcx, rcx, flags=(EZF,), dataSize=asz + bri t0, label("end"), flags=(CEZF,) # Find the constant we need to either add or subtract from rdi ruflag t0, 10 movi t3, t3, dsz, flags=(CEZF,), dataSize=asz @@ -85,6 +87,7 @@ topOfLoop: subi rcx, rcx, 1, flags=(EZF,), dataSize=asz add rdi, rdi, t3, dataSize=asz bri t0, label("topOfLoop"), flags=(nCEZF,) +end: fault "NoFault" }; @@ -104,6 +107,8 @@ def macroop OUTS_R_M { }; def macroop OUTS_E_R_M { + and t0, rcx, rcx, flags=(EZF,), dataSize=asz + bri t0, label("end"), flags=(CEZF,) # Find the constant we need to either add or subtract from rdi ruflag t0, 10 movi t3, t3, dsz, flags=(CEZF,), dataSize=asz @@ -119,6 +124,7 @@ topOfLoop: subi rcx, rcx, 1, flags=(EZF,), dataSize=asz add rsi, rsi, t3, dataSize=asz bri t0, label("topOfLoop"), flags=(nCEZF,) +end: fault "NoFault" }; ''' |