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







