tkt
This commit is contained in:
22
SCR2.1/ARM/TP18/#shift-experiment.s#
Normal file
22
SCR2.1/ARM/TP18/#shift-experiment.s#
Normal file
@@ -0,0 +1,22 @@
|
||||
.equ SYS_EXIT, 93
|
||||
|
||||
.data
|
||||
|
||||
int1: .quad 1
|
||||
int2: .quad 2
|
||||
|
||||
.text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
|
||||
mov x0,#1
|
||||
lsl x5,x0,#3
|
||||
lsr x5,x0,#1
|
||||
|
||||
mov w8,#SYS_EXIT
|
||||
mov x0,#0
|
||||
svc #0
|
||||
|
||||
.end
|
||||
|
||||
BIN
SCR2.1/ARM/TP18/a.out
Executable file
BIN
SCR2.1/ARM/TP18/a.out
Executable file
Binary file not shown.
BIN
SCR2.1/ARM/TP18/barrel-experiment.o
Normal file
BIN
SCR2.1/ARM/TP18/barrel-experiment.o
Normal file
Binary file not shown.
22
SCR2.1/ARM/TP18/barrel-experiment.s
Normal file
22
SCR2.1/ARM/TP18/barrel-experiment.s
Normal file
@@ -0,0 +1,22 @@
|
||||
.equ SYS_EXIT, 93
|
||||
.data
|
||||
int1: .quad 1
|
||||
int2: .quad 2
|
||||
.text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
|
||||
mov x0,#15
|
||||
|
||||
add x1,x0,x0,lsl #4
|
||||
|
||||
mov x2,#1
|
||||
sub x1,xzr,x2,lsl #3
|
||||
|
||||
mov w8,#SYS_EXIT
|
||||
mov w0,#0
|
||||
svc #0
|
||||
|
||||
.end
|
||||
|
||||
BIN
SCR2.1/ARM/TP18/shift-experiment.o
Normal file
BIN
SCR2.1/ARM/TP18/shift-experiment.o
Normal file
Binary file not shown.
19
SCR2.1/ARM/TP18/shift-experiment.s
Normal file
19
SCR2.1/ARM/TP18/shift-experiment.s
Normal file
@@ -0,0 +1,19 @@
|
||||
.equ SYS_EXIT, 93
|
||||
.data
|
||||
int1: .quad 1
|
||||
int2: .quad 2
|
||||
.text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
|
||||
mov x0,#1
|
||||
lsl x5,x0,#3
|
||||
lsr x5,x0,#1
|
||||
|
||||
mov w8,#SYS_EXIT
|
||||
mov w0,#0
|
||||
svc #0
|
||||
|
||||
.end
|
||||
|
||||
19
SCR2.1/ARM/TP18/shift-experiment.s~
Normal file
19
SCR2.1/ARM/TP18/shift-experiment.s~
Normal file
@@ -0,0 +1,19 @@
|
||||
.equ SYS_EXIT, 93
|
||||
.data
|
||||
int1: .quad 1
|
||||
int2: .quad 2
|
||||
.text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
|
||||
mov x0,#1
|
||||
lsl x5,x0,#3
|
||||
lsr x5,x0,#1
|
||||
|
||||
mov w8,#SYS_EXIT
|
||||
mov w0,#0
|
||||
svc #0
|
||||
|
||||
.end
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
I)
|
||||
|
||||
(gdb) l
|
||||
1 .equ SYS_EXIT, 93
|
||||
2 .data
|
||||
3 int1: .quad 1
|
||||
4 int2: .quad 2
|
||||
5 .text
|
||||
6 .globl _start
|
||||
7
|
||||
8 _start:
|
||||
9
|
||||
10 mov x0,#1
|
||||
(gdb) b 7
|
||||
Breakpoint 1 at 0x4000b0: file shift-experiment.s, line 10.
|
||||
(gdb) run
|
||||
Starting program: /export/home/an23/solar/SCR/SCR2.1/ARM/TP18/a.out
|
||||
|
||||
Breakpoint 1, _start () at shift-experiment.s:10
|
||||
10 mov x0,#1
|
||||
(gdb) i r x0 x5
|
||||
x0 0x0 0
|
||||
x5 0x0 0
|
||||
(gdb) s
|
||||
11 lsl x5,x0,#3
|
||||
(gdb) i r x0 x5
|
||||
x0 0x1 1
|
||||
x5 0x0 0
|
||||
(gdb) s
|
||||
12 lsr x5,x0,#1
|
||||
(gdb) i r x0 x5
|
||||
x0 0x1 1
|
||||
x5 0x8 8
|
||||
(gdb) s
|
||||
14 mov w8,#SYS_EXIT
|
||||
(gdb) i r x0 x5
|
||||
x0 0x1 1
|
||||
x5 0x0 0
|
||||
|
||||
|
||||
II)
|
||||
|
||||
|
||||
(gdb) l
|
||||
1 .equ SYS_EXIT, 93
|
||||
2 .data
|
||||
3 int1: .quad 1
|
||||
4 int2: .quad 2
|
||||
5 .text
|
||||
6 .globl _start
|
||||
7
|
||||
8 _start:
|
||||
9
|
||||
10 mov x0,#15
|
||||
(gdb) b 8
|
||||
Breakpoint 1 at 0x4000b0: file barrel-experiment.s, line 10.
|
||||
(gdb) rin
|
||||
Undefined command: "rin". Try "help".
|
||||
(gdb) run
|
||||
Starting program: /export/home/an23/solar/SCR/SCR2.1/ARM/TP18/a.out
|
||||
|
||||
Breakpoint 1, _start () at barrel-experiment.s:10
|
||||
10 mov x0,#15
|
||||
(gdb) i r x1 x0
|
||||
x1 0x0 0
|
||||
x0 0x0 0
|
||||
(gdb) s
|
||||
12 add x1,x0,x0,lsl #4
|
||||
(gdb) i r x1 x0
|
||||
x1 0x0 0
|
||||
x0 0xf 15
|
||||
(gdb) s
|
||||
14 mov w8,#SYS_EXIT
|
||||
(gdb) i r x1 x0
|
||||
x1 0xff 255
|
||||
x0 0xf 15
|
||||
|
||||
|
||||
3.
|
||||
|
||||
|
||||
(gdb) l
|
||||
1 .equ SYS_EXIT, 93
|
||||
2 .data
|
||||
3 int1: .quad 1
|
||||
4 int2: .quad 2
|
||||
5 .text
|
||||
6 .globl _start
|
||||
7
|
||||
8 _start:
|
||||
9
|
||||
10 mov x0,#15
|
||||
(gdb) b 8
|
||||
Breakpoint 1 at 0x4000b0: file barrel-experiment.s, line 10.
|
||||
(gdb) run
|
||||
Starting program: /export/home/an23/solar/SCR/SCR2.1/ARM/TP18/a.out
|
||||
|
||||
Breakpoint 1, _start () at barrel-experiment.s:10
|
||||
10 mov x0,#15
|
||||
(gdb) i r x0 x1 x2
|
||||
x0 0x0 0
|
||||
x1 0x0 0
|
||||
x2 0x0 0
|
||||
(gdb) s
|
||||
12 add x1,x0,x0,lsl #4
|
||||
(gdb) i r x0 x1 x2
|
||||
x0 0xf 15
|
||||
x1 0x0 0
|
||||
x2 0x0 0
|
||||
(gdb) s
|
||||
14 mov x2,#1
|
||||
(gdb) i r x0 x1 x2
|
||||
x0 0xf 15
|
||||
x1 0xff 255
|
||||
x2 0x0 0
|
||||
(gdb) s
|
||||
15 sub x1,xzr,x2,lsl #3
|
||||
(gdb) i r x0 x1 x2
|
||||
x0 0xf 15
|
||||
x1 0xff 255
|
||||
x2 0x1 1
|
||||
(gdb) s
|
||||
17 mov w8,#SYS_EXIT
|
||||
(gdb) i r x0 x1 x2
|
||||
x0 0xf 15
|
||||
x1 0xfffffffffffffff8 -8
|
||||
x2 0x1 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user