From d98f46ce647846b0aa30b2e16a30fd4e152a1bf5 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Thu, 10 Jul 2025 22:55:07 +0200 Subject: Add new code Signed-off-by: Carlos Maiolino --- CSAPP/shift.s | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 CSAPP/shift.s (limited to 'CSAPP/shift.s') diff --git a/CSAPP/shift.s b/CSAPP/shift.s new file mode 100644 index 0000000..c4a3bc7 --- /dev/null +++ b/CSAPP/shift.s @@ -0,0 +1,17 @@ + .file "shift.c" + .text + .globl shift + .type shift, @function +shift: +.LFB0: + .cfi_startproc + movq %rdi, %rax + salq $4, %rax + movl %esi, %ecx + sarq %cl, %rax + ret + .cfi_endproc +.LFE0: + .size shift, .-shift + .ident "GCC: (GNU) 5.3.1 20160406 (Red Hat 5.3.1-6)" + .section .note.GNU-stack,"",@progbits -- cgit v1.2.3