Questions tagged [x86-64]
x86-64 is a 64 bit extension to the Intel x86 architecture
x86-64
7,192
questions
1
vote
0
answers
27
views
Question about AVX-2, x86-64 function calls and Compilers [closed]
#pragma GCC optimize(3)
#include"immintrin.h"
char* SetOne(char* mat, unsigned long long length) { //Set char Mat[length+32] to all 0xFF, here I would initialize Mat as length+32 to ignore ...
0
votes
0
answers
21
views
While running a piece of driver code on an AMD64 machine, it appears that there are issues related to cache consistency or out-of-order execution
While running a piece of driver code on an AMD64 machine, it appears that there are issues related to cache consistency or out-of-order execution. Are there any experienced engineers who can help ...
-1
votes
0
answers
46
views
How does SYSCALL save the userspace RSP?
On a x86 CPU running in long mode, how is the user-mode $RSP value saved after the SYSCALL instruction by the kernel's handler function?
When changing from user mode (CPL=3) to kernel mode (CPL=0), ...
0
votes
0
answers
15
views
When running uname on m1 MacBook, x86 appeares [duplicate]
I am using M1 MacBook Air.
As fas as I know, M1 uses arm64 architecture.
But when I run uname -m -p command it shows x86_64 and i386.
M1 is arm, isn't x86 impossible?
If can possible run x86 on M1 ...
1
vote
0
answers
32
views
Unable to compile NASM without -no_pie on macOS
I'm trying to follow the tutorial for NASM and I made a few adjustments (like changing the entrypoint function from "start" to "_main") to get the following hello.asm to compile ...
0
votes
0
answers
49
views
How can I get this STDIN to work in GAS Assembler running on Linux?
I am new to Assembler and am currently reading a book about it by Jonathan Bartlett called 'Learn to Program with Assembly'. On pages 160-1 he gives the following sample program to demonstrate the use ...
0
votes
0
answers
30
views
Why is my assembly code giving extra output? [duplicate]
Before I start, it's important to say I am a complete beginner to Assembly, so I might be missing something very obvious.
I was trying to make an Assembly program where it prints the following output ...
1
vote
0
answers
48
views
Assembly jump instructions don't seem to work
bits 64
default rel
section .data
fmt db "%s", 0xd, 0xa, 0
err db "Correct usage: echo <string>"
section .text
extern printf
extern ExitProcess
global ...
-1
votes
0
answers
30
views
Adding ACPI into qemu and finding it in memory regions using 0xE820
I am working on an OS and I am trying to find the ACPI tables using the 0xE820 to find regions and find the ACPI reclaimable region
qemu-system-x86_64 -cpu qemu64 -machine q35 -m 128M -drive file=...
1
vote
1
answer
33
views
REX encoding for instructions with the VEX prefix
[x64]
is there some generic algorithm using which I can determine relevant registers for the rex byte? I'm specifically interested in the calculation of REX for instructions with the VEX prefix (so ...
0
votes
0
answers
31
views
gdb fails to access linux vmalloc-ed memory ffffc90000000000 in x86_64
My gdb (GNU gdb (GDB) 10.2) backtrace fails to access kernel memory in vmalloc range. This is with a kernel crash coredump on x86_64 platform.
In my understanding 0xffffc90000000000 is the vmalloc ...
1
vote
1
answer
145
views
Why is the computation speed of double in the Eigen library 3 times faster than that of float?
Here is my code. I created a set of matrix and vector multiplications using double type, and another set using float type. Both sets of multiplications are executed 3 million times in a for loop, and ...
3
votes
0
answers
51
views
How to pass arguments to a windows syscall in NASM assembly? [duplicate]
I am learning how to implement direct system calls using nasm assembly and c code, I have created a funcs.asm that contains
section .text
global NtOpenProcess
NtOpenProcess:
mov rax, 26h
...
4
votes
0
answers
59
views
Why does Intel x86 manual use +rd instead of +ro or +rq for 64-bit registers?
The description of the PUSH instruction in the Intel manual (PDF, Volume 2, Chapter 4.3, PUSH) contains the line 50+rd PUSH r64. It seems +rd is used throughout most of the instruction descriptions ...
0
votes
1
answer
47
views
Debugging assembly to call IUnknown::Release - is shadow space right?
I am getting a bug where sometimes this code works sometimes it does not:
48 8B 41 08 ; MOV RAX, [RCX + 0x08] gets the refcount
48 FF C8 ; DEC RAX ; decrement ...