Questions tagged [instruction-set]

Use for questions related to Instruction Set Architectures, ISA. For questions related to the inner workings of a CPU, use [cpu-architecture] instead.

An instruction set is a specification for a set of machine-readable instructions, or CPU instructions. An instruction set exists for all processing units including Graphics Processing Cores, Networking Card Processors as well at the CPU. The phrase "Instruction Set" usually implies the CPU type.

Each digital logic process which a processor can perform has an binary instruction code which caused the CPU to execute that exact instruction. An assembly language translates mnemonics into instruction codes. Instruction codes are likely to differ between different processor architectures. For example, the x86_64 instruction set for Intel CPU's includes additional 64 bit instructions (among others) for manipulating data 64 bits wide inside the CPU's core, which is an extension to the x86 32 bit capabilities of previous Intel CPU generations.

736 questions
1
vote
3 answers

Precisely when are ARM's condition flags cleared/modified?

I understand that to set them, we need to append the S, e.g. ADDS R0,R1,R2 which will for example, set C if the result overflows. Am I correct in saying: another line of code subsequent to the previous line such as: SUB R3,R4,R5 will make NO…
midnightBlue
  • 1,735
  • 2
  • 13
  • 13
1
vote
1 answer

Software Stack for a Particular computer

I am working on a project and my team is responsible for the software stack of the particular hardware. I only have the instruction set of the processor in my hand and I need to develop the complete software stack with it. Do I require anything else…
anichhangani
  • 129
  • 1
  • 9
1
vote
2 answers

Compiler modifications for new hardware

When writing in a language such as C, the compiler theoretically takes your human readable code and translates it into machine code - relatively hardware-dependent atomic instructions. Each CPU architecture seems to have an Instruction Set which is…
Justin
  • 1,226
  • 4
  • 18
  • 21
1
vote
2 answers

Confused about the binary code for the MVI instruction in the 8085 instruction code. Please see

Consider the instruction MVI A,32H to load 32H in the register A (Intel 8085 Microprocessor). My book says that it is a two byte instruction where the first byte is the opcode and the second is the operand. The first byte being 0011 1110 (3E in…
1
vote
1 answer

Which are the different variable cycle ARM instructions?

I was reading this book "ARM System Developers Guide" by Elsevier and I came across this: The ARM instruction set differs from the pure RISC definition in several ways that make the ARM instruction set suitable for embedded applications: Variable…
HaggarTheHorrible
  • 7,083
  • 20
  • 70
  • 81
1
vote
1 answer

Difference between branching and select instructions

The 'select' instruction is used to choose one value based on a condition, without branching. I want to know the differences between branching and select instructions (preferably for both x86 architectures and PTX). As far as I know, select is more…
Sayan
  • 2,662
  • 10
  • 41
  • 56
1
vote
2 answers

ARM Instruction Decoding

I need to decode ARM(ARM926EJ) instructions in C. I have the 32 bit instruction in hex. I want to decode and get the opcode operands. Anyone know any good material for this. N.B. I looked into QEMU translate.c file. But its so complex and doesn't…
sheikh
  • 117
  • 4
  • 13
1
vote
1 answer

How to devise instruction set of a stack based machine?

Stack based virtual machines like CLR and JVM has different set of instructions. Is there any theory behind devising the instruction set while creating a virtual machine? e.g. there are JVM instruction sets to load constants from 0-5 onto the…
Anindya Chatterjee
  • 5,824
  • 13
  • 58
  • 82
1
vote
3 answers

What is the minimum assembly instructions needed?

If you were to build a processor that would be used to run any arbitrary program, what is the minimum set of instructions (ISA) you could get away with? I was thinking: ALU-ops (add, sub, mul, div) Load reg,[address] Store reg,[address] Branch-if…
JDS
  • 16,388
  • 47
  • 161
  • 224
1
vote
0 answers

Is the carry flag obsolete?

The carry flag seems to have two main uses. 1) it is useful for chaining addition/subtraction instructions to operate on numbers larger than native size. Adding 32bit ints on an 8-bit architecture for example. 2) it is used for conditional branches.…
phkahler
  • 5,687
  • 1
  • 23
  • 31
1
vote
1 answer

When to load operands in an TriCore emulator?

this is my first posting on Stack Overflow so I hope I am doing it correctly. ;-) I am trying to develop a TriCore emulator but cannot decide on a strategy when to load operands for an instruction. The TriCore is maybe a rather obscure kind of…
0
votes
1 answer

MIPS shifting to the right (but adding 1's instead of zero's)

Is there anyway to shift a register value to the right but instead of adding 0's (like srl does), make it add 1's. If that's not possible, any other suggestions to accomplish the same goal would be appreciated.
ion3023
  • 151
  • 1
  • 1
  • 4
0
votes
2 answers

Data Types additions larger than word

How are large data types(Double/Float) loaded in to registers for Arithmetic operations ? Can registers hold more than a word size data ? If only 2 registers can be added to load the result to third register, then what happens with data types larger…
Carbonizer
  • 1,915
  • 2
  • 19
  • 22
0
votes
1 answer

Register to register comparisons

I have studied what composes a CPU and how random access memory is structured, but I don't understand register to register comparison operations. "Why are register to register comparison operations usually faster than the equivalent operation on two…
Indexcard88
  • 39
  • 1
  • 2
0
votes
1 answer

Why is there "syscall" instruction in the x86-64 ISA, if syscalls are OS related?

I am a bit confused about the use of syscalls in OSs, assembly, and machine code. From what I have understood, syscalls are the interface for users and applications to request services and resources from the OS, and their implementation depends on…