Skip to content
Commit 487386a4 authored by Ammar Faizi's avatar Ammar Faizi Committed by Greg Kroah-Hartman
Browse files

tools/nolibc: x86-64: Use `mov $60,%eax` instead of `mov $60,%rax`

[ Upstream commit 7bdc0e7a

 ]

Note that mov to 32-bit register will zero extend to 64-bit register.
Thus `mov $60,%eax` has the same effect with `mov $60,%rax`. Use the
shorter opcode to achieve the same thing.
```
  b8 3c 00 00 00       	mov    $60,%eax (5 bytes) [1]
  48 c7 c0 3c 00 00 00 	mov    $60,%rax (7 bytes) [2]
```
Currently, we use [2]. Change it to [1] for shorter code.

Signed-off-by: default avatarAmmar Faizi <ammar.faizi@students.amikom.ac.id>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Stable-dep-of: 184177c3

 ("tools/nolibc: restore mips branch ordering in the _start block")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 27af4f22
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment