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
2 answers

Conditional instructions in AVX2

Can you give the list of conditional instructions available in AVX2? So far I've found the following: _mm256_blendv_* for selection from a and b based on mask c Are there something like conditional multiply and conditional add, etc.? Also if…
1
vote
1 answer

How can I check whether an ISA extension is supported by current ARM CPU?

When a userspace program on x86 needs to determine whether e.g. AVX extension is supported, it can use CPUID instruction. Is there any similarly OS-independent way to check support for an ISA extension (e.g. NEON) in ARM?
Ruslan
  • 18,162
  • 8
  • 67
  • 136
1
vote
3 answers

What is the difference between system calls and instruction set

Iam confused whether system calls and instruction set are synonymous? Do the instructions like MOV, LOAD, CALL, IN, OUT , ADD, SUB etc fall in the category of system calls? System call instructions like open(), close(), read(), write(). If not then…
1
vote
0 answers

How to choose instructions for a homebrew CPU?

I am designing a minimal home-brew CPU (for fun and learning) capable of addition and subtraction. P->| |---------->P A->| ___ |---------->A 0->|-| | |---------->T |ADD|-|->ROM-->| R->|-|___| |->RAM<->| N->| |->R …
fadedbee
  • 42,671
  • 44
  • 178
  • 308
1
vote
1 answer

C to assembly - leaq instruction

As far as I understood: %rdi = 1st argument = x %rsi = 2nd argument = y %rdx = 3rd argument = z The others manipulate these registers... and store in a return value register The 3rd line on the assembly code leaq (%rsi, %rsi, 2), %rdx, which as I…
dud3
  • 409
  • 1
  • 6
  • 16
1
vote
1 answer

How to compute Stack usage on TI processor from the LST files?

The .lst file gives FR SIZE for each function used in the code. Can I consider that as the stack usage in Words? I am trying to find any supporting document for this, but in vain.
Yutha
  • 11
  • 3
1
vote
1 answer

Heap pointer register?

Many ISAs, such as MIPS, has a register called "stack pointer" to indicate the top of the stack. Why isn't a "heap pointer" register? Does the top of the heap get stored in memory?
xri
  • 123
  • 4
1
vote
2 answers

A simple MIPS, question

I have a question, which is kind of confusing Write the MIPS instruction whose machine language encoding is: 0000 0011 0001 1001 0100 0000 0010 1010 Your answer must use register names (like $t0) not numbers; and must specify any immediate as a…
smooth_smoothie
  • 1,319
  • 10
  • 27
  • 40
1
vote
1 answer

Defining and Using Global Variable in PowerPC Assembly file

I want to save the contents of a SPR ( Special Purpose Register ) to a global variable. I don't have much experience in Assembly, but i tried to do it as follows : .global __The_Global_Variable mfspr r16, 695 #695 is the number of the SPR…
1
vote
0 answers

Are Kernel functions/x86 instructions outw and inw atomic when accessing ISA/LPC?

tl;dr Are Linux kernel functions outw() and inw() atomic when accessing ISA/LPC on x86 on a multicore system, given that at a HW level it must consist of four separate 8-bit transactions? As an equivalent question, since outw() and inw() functions…
Damien
  • 785
  • 3
  • 8
  • 18
1
vote
3 answers

Difference between implied and immediate addressing mode?

Implied: operands are specified implicitly in the definition of instruction. Examples: CLA,CME,INP. It is mainly used for Zero-address (STACK-organized) and One-address (ACCUMULATOR-organized) instructions. Immediate: operand is specified in the…
1
vote
1 answer

Multiple ISA in same ELF file

Is it possible to have an ELF file that contains executable instructions from two ISAs. That is have a single ELF file that can be run on two architectures, say a x86 and a PowerPC. One example of this that comes to mind was the Apple Universal…
ssb
  • 7,422
  • 10
  • 36
  • 61
1
vote
1 answer

why is a vdiv instruction generated with neon flags?

I disassembled an arm binary previously compiled with neon flags: -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize The dump shows a vdiv.f64 instruction generated by the compiler. According to the arm manual for armv7 (cortex-a9) neon…
1
vote
3 answers

Assembler mov issue

I have the next code: mov ax,@data mov ds,ax Why I can not write just like this? mov ds,@data All source: .MODEL small .STACK 100h .DATA HelloMessage DB 'Hello, world',13,10,'$' .CODE .startup mov ax,@data mov ds,ax …
Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143
1
vote
1 answer

Need Clarification on Memory Accessing (ISA/MIPS)

I'm doing a theoretical assignment where I design my own ISA. I'm doing a Memory-Memory design where the ALU receives inputs from memory and outputs back to memory without using any registers. This is an outdated method and registers are more…