Questions tagged [instructions]

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

Questions about instructions of real CPUs such as ARM and x86, virtual machines such as Java, or compiler internal representations such as LLVM.

574 questions
12
votes
1 answer

MIPS and ARM differences

I just started learning architecture and I have some confusions between MIPS and ARM architectures. I came to know that the MIPS predominantly has two instruction formats: I and R (J as well). I read about these representation formats, rs, rt,…
Mail
  • 314
  • 1
  • 2
  • 9
11
votes
1 answer

What x86 instructions take two (or more) memory operands?

I thought that there was zero. But, I see here, Instructions with two memory operands are extremely rare I can't find anything that explains what instructions, though rare, exist. What are the exceptions?
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
11
votes
1 answer

Difference between long and short jump (x86)

I've read that short jumps are to be used when the relative jump is less than 124 in address, and long jumps should be used otherwise. What is the difference in terms of operations performed in the CPU / performance between the two types of jumps on…
nadavge
  • 590
  • 1
  • 3
  • 14
11
votes
3 answers

Android instructions when open the application at first time?

Do you know this Well I want create something like this screen. When I open for the first time the application I want open this screen and display a context.. How is possible? I don't know what search for this type of thing..
David_D
  • 1,404
  • 4
  • 31
  • 65
10
votes
2 answers

What is the definition of JAL in RISC-V and how does one use it?

I don't get how JAL works in RISC-V as I've been seeing multiple conflicting definitions. For example, if I refer to this website: https://rv8.io/isa.html It says that: JAL rd,offset has the 3rd argument as the offset, but there are some cases that…
winnie99
  • 113
  • 1
  • 1
  • 7
10
votes
1 answer

Assembly programming - WinAsm vs Visual Studio 2017

I'm here to ask you some stuff about VS2017. In the past I had used WinAsm for MASM and I never got problems with it. However, when I'm trying to do something with MASM in VS2017, I always gonna get problems and stuff... I've checked the whole…
Gregan Dark
  • 101
  • 1
  • 5
10
votes
1 answer

What is the significance of operations on the register EAX having their own opcodes?

If you look at documentation of operations like cmp, test, add, sub, and and, you will notice that operations that involve register EAX and its 16 and 8 bit variants as the first operand have a distinct opcode which is different from the "general…
Govind Parmar
  • 20,656
  • 7
  • 53
  • 85
9
votes
0 answers

What is integer division heavily used for?

An analysis on https://ridiculousfish.com/blog/posts/benchmarking-libdivide-m1-avx512.html finds that the new Apple CPU has spent a lot of resources making integer division massively faster. This is a surprising thing to do. In my experience,…
rwallace
  • 31,405
  • 40
  • 123
  • 242
9
votes
4 answers

What does it mean by "MOV AH, 4CH" in assembly language?

Most of the assembly code is terminate by the following instructions MOV AH, 4CH INT 21H What does it mean by "MOV AH, 4CH" ?
Shams Nahid
  • 6,239
  • 8
  • 28
  • 39
9
votes
3 answers

ARM assembly cannot use immediate values and ADDS/ADCS together

I am currently trying to speed up some of my C functions on a Cortex-M0 (Freescale KL25Z) using assembly. I get a problem with this minimal test program: @.syntax unified .cpu cortex-m0 .text .global test .code 16 test: mov r0, #0 adds r0,…
xGentx
  • 93
  • 1
  • 4
8
votes
1 answer

In ARM64 assembly code, when is register 31 XZR versus SP?

In ARM64 assembly code, when does register number 31 mean XZR and when does it mean SP?
Myria
  • 3,372
  • 1
  • 24
  • 42
8
votes
1 answer

Committed Vs Retired instruction

It may be a stupid question but I'm not able to find a clear explanation about these 2 phases of an instruction life. My initial thinking was that they are synonymous but I'm not sure anymore. I start to think that For a load commit and retire…
haster8558
  • 423
  • 6
  • 15
8
votes
1 answer

How exactly does the x86 LOOP instruction work?

mov ecx, 16 looptop: . . . loop looptop How many times will this loop execute? What happens if ecx = 0 to start with? Does loop jump or fall-through in that case?
Hannah Duncan
  • 209
  • 1
  • 4
  • 12
8
votes
1 answer

Explain (buffers, analyse) in postgresql

I am new in postgresql and I try to understand explain (buffers, analyse) instruction. I have a query and I execute it using explain (buffers, analyse). The first time i execute it the performance is worse than the second time. Also, the first time…
8
votes
2 answers

What do we mean by instruction size?

I am really confused and the question may sound dumb but I'm really not sure what it means when we say an instruction size is 32-bit or 16-bit. Is it if operand size is 32-bit then we say it's an 32-bit instruction and if operand size is 16-bit…
Amit Singh Tomar
  • 8,380
  • 27
  • 120
  • 199
1 2
3
38 39