Questions tagged [instructions]

Questions about instructions of real CPUs, VMs or compiler IRs.

Filter by
Sorted by
Tagged with
-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 ...
vishals1991's user avatar
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 ...
Tom Smith's user avatar
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 &...
SugarFree's user avatar
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 ...
kam's user avatar
  • 649
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 ...
choiyhking's user avatar
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?...
P4WN3R's user avatar
  • 19
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?
vengy's user avatar
  • 1,794
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?...
FunkyAP's user avatar
  • 11
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 ...
Ayush Kumar Shukla's user avatar
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/...
Tarletsky Andrey's user avatar
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 ...
hurryman2212's user avatar
-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 ...
pmor's user avatar
  • 5,593
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 ...
tuxifan's user avatar
  • 29
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 ...
raff's user avatar
  • 349
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 ...
Sathvik Swaminathan's user avatar
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 ...
silsa100's user avatar
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: ...
Say God's user avatar
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 ...
koko riko's user avatar
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 ...
K60 ĐOÀN NGUYỄN BẢO AN's user avatar
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 ...
Arthur Maciel Batista's user avatar
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$(...
Tanawin Devaveja's user avatar
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 ...
ASDQWERTYUI's user avatar
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 ...
BipedalJoe's user avatar
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 ...
RK Eshat's user avatar
-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 ...
Ecir Hana's user avatar
  • 11k
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 ...
Letsgox's user avatar
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 ...
User123X's user avatar
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?
Ryan Pham's user avatar
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 ...
Karim Fouad's user avatar
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 ...
sh code's user avatar
  • 323
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 ...
MateMann's user avatar
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: ...
David Monniaux's user avatar
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 ...
Michael Moreno's user avatar
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 ...
gabe's user avatar
  • 1
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 ...
Hanrabong's user avatar
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", &...
Tom Jose's user avatar
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 ...
YoavKlein's user avatar
  • 2,131
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 ...
penguin99's user avatar
  • 111
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 ...
CodeForFun's user avatar
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 ...
Panopticron's user avatar
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, ...
Kevin Chang's user avatar
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 ...
Da3kL10rd's user avatar
  • 360
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 ...
Jade 's user avatar
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 ...
SRobertJames's user avatar
  • 8,561
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 ...
AMDG's user avatar
  • 1,118
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 ...
Lolo's user avatar
  • 3,975
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 ...
Shane's user avatar
  • 337
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 ...
KRS Nandhan's user avatar
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 ...
Stavros Koureas's user avatar
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: ...
malymary's user avatar

1
2 3 4 5
12