File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,15 @@ fragment mov := λ(: src LocalVariable+Sized<size>)(: index Literal+Constant)(:
67
67
))
68
68
))
69
69
) Nil);
70
+ fragment mov := λ(: src Reg64+x[])(: index Literal+Constant)(: dst LocalVariable+Sized<size>). (: (
71
+ (.program (
72
+ (\t 'mov \s '% (.expression src) , \s '%r14 \n)
73
+ (for word-offset in (range( 0 (/( size 8 )) )) (
74
+ \t 'movq \s (*( word-offset 8 )) \[ '%r14 \] , '%r15 \n
75
+ \t 'movq \s '%r15 , \s (+( (.expression dst) (*( word-offset 8 )) )) \[ '%rbp \] \n
76
+ ))
77
+ ))
78
+ ) Nil);
70
79
71
80
fragment mov := λ(: src LocalVariable)(: dst Constant+Reg64). (: ( (.program( \t 'mov \t (.expression src) \[ '%rbp \] , \s '% (.expression dst) \n)) ) Nil);
72
81
fragment mov := λ(: src GlobalVariable)(: dst Constant+Reg64). (: ( (.program(
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ close := λ(: x S). (: (tail(
10
10
(as R8 S[])
11
11
)) S[]);
12
12
13
- open := λ(: x S[]). (: (tail(
14
- ()
15
- SNil
16
- )) S);
17
-
18
13
print := λ(: x S). (: (tail(
19
14
(if (==( (.0 x) 3u64 )) (
20
15
(print '\[\]_s)
@@ -23,10 +18,13 @@ print := λ(: x S). (: (tail(
23
18
(print (.1 (as x SAtom)))
24
19
) (
25
20
(if (==( (.0 x) 1u64 )) (tail(
21
+ (let c SNil)
26
22
(print '\[_s)
27
- (print (open (.1 (as x SCons))))
23
+ (mov( (.1 (as x SCons)) 0u64 c ))
24
+ (print c)
28
25
(print '\s_s)
29
- (print (open (.2 (as x SCons))))
26
+ (mov( (.2 (as x SCons)) 0u64 c ))
27
+ (print c)
30
28
(print '\]_s)
31
29
)) (tail(
32
30
(print '[_s)
You can’t perform that action at this time.
0 commit comments