From e9791e6bb980317e15fef8bde608bb57197ddae3 Mon Sep 17 00:00:00 2001 From: Omar Arain Date: Mon, 13 Mar 2017 23:27:30 -0500 Subject: [PATCH] rm print --- CSTR_Compiler/cstr_codewriter.py | 2 +- asm/string3.s | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CSTR_Compiler/cstr_codewriter.py b/CSTR_Compiler/cstr_codewriter.py index 2eab262..f052543 100644 --- a/CSTR_Compiler/cstr_codewriter.py +++ b/CSTR_Compiler/cstr_codewriter.py @@ -93,7 +93,7 @@ def visit_Program(self, node): _string = _s.replace('"','').replace('\\','').replace(' ','').replace("'",'') # print _string str_label = "L"+_string + "_label" - print [str_label] + #print [str_label] # print str_label if str_label not in self._unique_labels: self._unique_labels.append(str_label) diff --git a/asm/string3.s b/asm/string3.s index 3d07b32..219505d 100644 --- a/asm/string3.s +++ b/asm/string3.s @@ -3,13 +3,13 @@ .text .data -_label: +L_label: .string "" .zero 512 -hello_label: +Lhello_label: .string "hello" .zero 512 -world_label: +Lworld_label: .string "world" .zero 512 global_0: @@ -40,7 +40,7 @@ sub: ### FunctionDef Body, remember to clean stack ### Assignment eval expr ### Constant push const - pushq $_label + pushq $L_label ### Assignment mov from stack to reg, assign to var popq %rax movq %rax, -40(%rbp) @@ -149,7 +149,7 @@ invert: ### Ident, pushing s to stack pushq -8(%rbp) ### Constant push const - pushq $_label + pushq $L_label ### perform op, push to stack ### copy ### BinaryOp string, push rhs, lhs into reg popq %rsi @@ -163,7 +163,7 @@ invert: IF_TRUE_0: ### Return, eval expressions ### Constant push const - pushq $_label + pushq $L_label ### Return restore registers movq -48(%rbp),%r15 movq -40(%rbp),%r14 @@ -281,13 +281,13 @@ main: ### FunctionDef Body, remember to clean stack ### Assignment eval expr ### Constant push const - pushq $hello_label + pushq $Lhello_label ### Assignment mov from stack to reg, assign to var popq %rax movq %rax, -8(%rbp) ### Assignment eval expr ### Constant push const - pushq $world_label + pushq $Lworld_label ### Assignment mov from stack to reg, assign to var popq %rax movq %rax, -16(%rbp)