Skip to content

Commit

Permalink
rm print
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Arain committed Mar 14, 2017
1 parent b6cf068 commit e9791e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CSTR_Compiler/cstr_codewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions asm/string3.s
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e9791e6

Please sign in to comment.