Questions tagged [instructions]
Questions about instructions of real CPUs, VMs or compiler IRs.
583
questions
-1
votes
2
answers
57
views
How to add conditional branch instruction without else option?
I am trying get my IR to look like below. Is it possible to achieve this in LLVM?
entry:
%2 = call i32 @func()
%3 = icmp ne i32 %2, 0, !dbg
br i1 %3, label %if.then.block
call void @abc()
ret ...
0
votes
1
answer
49
views
What is the Name of this Process Analysis Software / What Type of Software is it?
As the title describes, does anyone know any information on this specific piece of software? I would like to find the literal software in the image. But could suffice with type of software for the ...
0
votes
1
answer
127
views
C problem about Compiler and Memory Theory [closed]
Without calling any "call" or "jump" function, we need to get a output in order of "this is the first" then "this is the second.". In my opinion we need to use &...
2
votes
1
answer
48
views
Wasm instruction ambiguity for sign-extension?
Are there any differences with respect to the effect
of i64.extend32_s and i64.extend_i32_s or are they just duplicates?
I'm trying to implement a toy compiler/interpreter lib for wasm, and the ...
1
vote
0
answers
52
views
In the full virtualization, how to do binary translation for "popf" instruction in x86?
I'm studying about virtualization.(I'm a undergraduated student)
In CPU Full virtualization, as far as I know, x86 was difficult to be virtualized because it has about 17 sensitive but unprivileged ...
0
votes
0
answers
65
views
What is First Three Instructions in the Disassembled Code
What is the meaning of the first three commands being the same after most programs are disassembled? What is the meaning of the first three commands being the same after most programs are disassembled?...
2
votes
1
answer
218
views
Is VGF2P8AFFINEINVQB the longest x86 instruction mnemonic?
Trivia Question
At 17 characters, is VGF2P8AFFINEINVQB - Galois Field Affine Transformation Inverse, the longest x86 instruction mnemonic? Is there a length limit?
0
votes
1
answer
82
views
Stm8 assembly instructions
I am trying to learn some basic fw reverse engineering but I need some help. I am complete novice when it comes to asm but I do have some background on other languages.
What does the following line do?...
0
votes
0
answers
72
views
How many machine cycles does the HLT instruction require on the intel 8085?
I have referred the Intel 8085 manual, it says that the HLT instruction requires 1 machine cycle and 5 or more T states, but my textbook and some internet sources say that it requires 2 machines ...
1
vote
0
answers
138
views
RISC-V FENCE Instruction test
The RISC-V Instruction Set Manual in the chapter RV32I Base Integer Instruction Set specifies fence and fence.i instructions. But on official git repository (https://github.com/riscv-software-src/...
1
vote
0
answers
150
views
Questions about concurrent & interrupted UMONITOR/UMWAIT behaviors [closed]
UMONITOR & UMWAIT instruction for supported Intel x86 processors can be very useful waiting for short period of time in userspace without kernel transition overhead while waiting for shared memory ...
-1
votes
1
answer
416
views
List of ARM instructions implementing half-precision floating-point arithmetic
Arm Architecture Reference Manual for A-profile architecture (emphasis added):
FPHP, bits [27:24]
0b0011 As for 0b0010, and adds support for half-precision floating-point arithmetic.
A simple ...
0
votes
1
answer
96
views
Clang: How do I see where and why an ud2 instruction was generated?
In a really big project of mine, Clang seems to throw in ud2 instructions at some function calls. However, even with -Wall it doesn't seem to tell me why. I am using coroutines quite heavily in that ...
0
votes
1
answer
94
views
Is "strb w0, [x2, w3, uxtw]" the same as "strb w0, [x2, w3, uxtw #0]"?
I'm totally puzzled.
I thought that the following instructions are totally the same:
strb w0,[x2,w3,uxtw 0]
strb w0,[x2,w3,uxtw]
but when I assemble them, I get different encoding:
40 48 23 ...
0
votes
0
answers
51
views
Testing instruction implementation on QEMU
I've extended the QEMU-based instruction set of a specific architecture using helper functions. How do I go about testing their implementation? Are there any standard QEMU testing practices or do I ...
1
vote
0
answers
62
views
Is there an Arm Instructions parser for Ghidra that allows to replace References?
I am trying to replace References in CodeUnits with Ghidra. The problem is that every instruction with a reference might look different e.g.:
bne LAB_00001234
or
cbz r3, LAB_00001234
My goal would ...
0
votes
1
answer
48
views
Program implementation with using specific CPU instructions
I want to realize following steps:
unsigned c = 5
c=c*5
I must do this by using this architecture and using 3 instructions at MOST:
CPU Architecture
Sample instructions for the cpu are like:
...
1
vote
1
answer
78
views
Algorithm for testing correct operation of the UNPKBU4 instruction on TMS320C66x
algorithm on testing the correct operation of the UNPKBU4 instruction in the TMS320C66x microprocessor.
I hope someone here point me to the right direction cause I am kinda stuck and I need some ...
0
votes
0
answers
18
views
How to analyze quantitative research data using SPSS
My team is doing a quantitative research about factors affecting university students when opting for secondhand clothes via the e-commerce platforms like Shopee, Lazada, etc. I'm taking charge of ...
0
votes
0
answers
19
views
Using visual studio 2022's debugger in a game that won't open in an emulator, I noticed this error that stops the game after about a minute
Does somebody know what this instruction mean?
Oh, I have searched for it already, so no need to ask me to do it again, I just couldn't understand, that's why I'm coming here.
0000000140B39D87 ...
0
votes
0
answers
96
views
compile pin tool with protobuf in makefile error
I have to include google protocol buffer in pintool in order to save trace data but when I compile with this makefile makefile.rules
TOOL_LIBS += -lprotobuf -pthread -lboost_system
$(OBJDIR)Source1$(...
0
votes
0
answers
67
views
Measuring L1-Instruction cache associativity with a benchmark
How to practically test associativity degree of L1-Instruction cache?
As far as I get it, I need cpu to execute same command from different addresses wth offset = (Bank size) * N, but how can I do it ...
0
votes
1
answer
97
views
Is carry flag usually cleared after Jump-Not-Carry instruction has been evaluated?
I'm writing a simple simulation of a microprocessor, and, for the JNC instruction, I am unsure if the carry bit is automatically reset after the JNC instruction. Is it (generally, although different ...
0
votes
0
answers
21
views
Second Operand in MOV instruction [duplicate]
MOV R19,R18
We know that the data in Register R18 will move to R19 which is called the destination register.
My question is, what happens to R18 here after that? Does it become blank? Does it ...
-2
votes
1
answer
330
views
Most frequently used instructions [closed]
Every now and then I read somewhere that of all of the instruction a CPU has only very few are used most of the time, last time it was here where the author writes: "There are only a handful of ...
0
votes
0
answers
144
views
Is it possible to divide/split an instruction to more than four-subinstructions?
I am currently studying computer-science, and i was really thinking about this question:
Is it possible to divide/split an instruction to more than four-subinstructions?
Please help, and also comment ...
0
votes
1
answer
144
views
How do I change the latency of an instruction in gem5?
I could access the latency of the dram but I could not find the latency of the instructions for the matrix multiplication in gem5. I have found the OpClass.hh and the file containing the all the ...
0
votes
1
answer
81
views
How are numbers in bit sequence being referred to?
For instance, the 0x123 value is stored to a register. What do the bits [7:3] mean for in the value? Are they talking about the binary value of 0x123?
0
votes
0
answers
30
views
memory whose size is larger than the available size in an instruction
Hello All I hope you are fine , Please i have 2 Questions
if the ISA is 16 bits and Ram is 8 bit only for one address what will happen?
If My ram is 16 bits and ISA 16 bits the featch will get 16 ...
0
votes
1
answer
225
views
(x64) Where can I find CPU instructions usage statistics in contemporary programs?
I'm looking for some statistics which would tell me/show how frequently each instruction from x64 instruction set is used overall in modern programs. I have done some google searches, but I can't find ...
1
vote
0
answers
176
views
Categorization of x86 Assembly instructions
As described in this x86 Assembly Guide, x86 Assembly instruction can be divided into the following categories:
Control Flow Instructions, Arithmetic and Logic Instructions and Data Movement ...
2
votes
1
answer
222
views
is fcvtzs d0,d0 really an AArch64 SIMD instruction?
gcc seems to classify fcvtzs d0,d0 as as SIMD instruction, but clang does not. Who is right?
$ cat toto.s
fcvtzs d0,d0
$ aarch64-linux-gnu-gcc-10 -mcpu=cortex-a53+nosimd -c toto.s
toto.s: ...
2
votes
1
answer
885
views
Why do x86 mul and div instructions only take a source operand?
In x86 assembly, most instructions have the following syntax:
operation dest, source
For example, add looks like
add rax, 10 ; adds 10 to the rax register
But mnemonics like mul and div only have a ...
0
votes
0
answers
159
views
How can I count total number of instructions of a function in a WebAssembly module?
WebAssembly code consists of sequences of instructions. I am looking to identify the total number of instructions of a certain function in a WebAssembly module.
Is there an existing method to easily ...
0
votes
1
answer
196
views
Is LEA valid with a negative scale, or SUB with a scaled register?
I have two registers mapped like this to a variable
%rdi = x, %rsi = y
I want to make y = y - 4x
My trial goes like this. I subtracted x four times to get y - 4x.
subq %rdi, %rsi # y = y - x
...
0
votes
0
answers
169
views
how do conditional branches and instructions which update conditional flags operate in an out of order arm architecture?
I have the following sequence of instructions:
Address instr Operands
4357128L cmp {"x1", "#16"}
4357132L bne {"4356768"}
4357136L add {"w19", &...
3
votes
3
answers
465
views
What exactly is the problem that memory barriers deal with?
I'm trying to wrap my head around the issue of memory barriers right now. I've been reading and watching videos about the subject, and I want to make sure I understand it correctly, as well as ask a ...
0
votes
2
answers
831
views
How do instructions from a program get sent to different memory levels? Are they pre-loaded when the chips are manufactured for the first time?
I had asked a question earlier on how data gets pushed to registers in the CPU
My question now is, do instructions required for program execution get moved to memory by the compiler the same way data ...
0
votes
1
answer
234
views
How to correctly access a non-constant index in an LLVM array?
I've been trying to tackle arrays in LLVM, but I am not able to access elements at a non-constant index. Constant indexing works correctly. When I run my program, it just immediately exits. In my ...
0
votes
0
answers
67
views
physical memory store location from this sequence of instructions: data overlaps into code segment? [duplicate]
Consider the assembly program snippet below and, knowing that DS = 2000H and CS = 5000H, answer the following question:
INSTRUCTION
1 MOV AX, 3245H
2 MOV DL, O0H
3 MOV CL, 0AH
4 ...
0
votes
1
answer
411
views
How to know which register(s) is read from as it executed?
I have a question about these kinds of quizzes. What is the theory behind this?
Given the following instruction, which register(s) is read from as it is executed? (Select all that apply)
and $sp, $gp, ...
0
votes
1
answer
47
views
Significance of learning 32 bit exploitation
I'm thinking of taking EXP 301 (Windows User Mode Exploit Development) exam. And I did some research on this exam; I came around many articles which criticised the exam material for only covering 32 ...
0
votes
0
answers
253
views
Determine the average time taken to process 13 instructions with this system?
Question:
A non-pipelined system takes 7.5 ns to process an instruction with a clock cycle of 1.5 ns. The same instruction can be processed in a 5-segment pipeline.
The instruction set architecture of ...
1
vote
0
answers
35
views
Force NASM to use quadwords [duplicate]
In gas, I can do movabs rcx, 0x402041, which assembles to 48b941204000. NASM doesn't support movabs. I've tried doing mov rcx, 0x402041, and mov rcx, QWORD 0x402041, but, in either case, NASM ...
0
votes
0
answers
133
views
Do x86 and other architectures have a fused shift and add?
A number of architectures support fused multiply and add such as x86 with pmaddwd (and its SSE extensions), but I am unaware of any x86 fused shift and add which is effectively equivalent to FMA. This ...
1
vote
0
answers
113
views
How to guarantee ordering of instruction in C
My multithreaded code is as follows:
thread A
while(true) {
foo();
sleep();
}
thread B
...
bar_off();
bar_on();
...
foo() isn't safe to be executed when bar_off is called and until bar_on has ...
1
vote
1
answer
691
views
What hardware (CPU) in which the `rem` and `div` are two different assembly instructions?
I'm researching about the optimization of llvm IR and I notices the pass div-rem-pairs.
I found the source code about this pass and this is the link.
I paste the comment below.
// The target ...
4
votes
0
answers
430
views
Why left shift instruction has two names (SAL and SHL) in x86-64 ISA? [duplicate]
I know that logical left shift and arithmetic left shift perform the same operation of multiplying the number with 2k when shifted by k bits. In x86-64 ISA, there are two instructions for logical left ...
0
votes
1
answer
1k
views
Tensorflow on Docker Engine Error Code 132
I am using Docker and Docker-Compose on Ubuntu 20. The application I am deploying on container is using Tensorflow. Docker-Compose build is able to be executed but not the Docker-Compose up because is ...
0
votes
1
answer
75
views
Can the CPU mistake data for instruction in Von Neumann architecture?
Since Von Neumann model stores both instructions and data in the same block of memory, I was wondering what can happen during the fetch-decode-execute cycle. Some points I am especially worried about:
...