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
3
votes
1 answer

Z80 DAA flags affected

In the following link, http://www.z80.info/z80syntx.htm#DAA I got confused over the condition for setting H flag. The description says to look at the table but unlike C where there is the column C after DAA, for H there is only H before DAA... So,…
kofhearts
  • 3,607
  • 8
  • 46
  • 79
3
votes
3 answers

Why did they use numbers for register names in x86-64?

AFAIK x86-64 adds a number of general purpose registers to those derived from Intel x86 (rax, rcx, etc), called r8-r15. Why did they name the new registers like this? Why not just follow existing naming convention and call them like rfx, rgx ... ?
szx
  • 6,433
  • 6
  • 46
  • 67
3
votes
2 answers

New ISA instructions vs i386

I understand that all x86 (i386) binaries compiled today, with the latest compilers (GCC, Intel CC, VC, etc) will run on an Intel 386 machine (allowing for external dependencies, like OS functions, etc) which explains why there are videos on YouTube…
Dai
  • 141,631
  • 28
  • 261
  • 374
3
votes
3 answers

Is there any way to find the Instruction Set of an undocumented processor?

There are some processors out there that don't have commercially released documents explaining what its instruction set is. Is there any way to find the instruction set through tampering or an external device if you have access to the processor?
3
votes
1 answer

"Missing" arithmetic instructions in Tilera and SSE. How are the operations done?

I browsed through the Tilera Instruction Set and noticed it has only add, subtract, multiply, divide, and shifts. There is no mention of roots, powers, logs, etc. I also noticed that SSE (in all flavors) does not have the latter mentioned…
IamIC
  • 17,747
  • 20
  • 91
  • 154
2
votes
2 answers

Writing an interpreter in C#: Best way to implement instructions?

I'm writting a PLC language interpreter using C#. That PLC language contains over 20 data types and 25 instructions or so. As soon as I started to generate code I balance two differents ways to write instructions: 1) Every kind of instruction is…
Jose Esperon
  • 111
  • 1
  • 10
2
votes
1 answer

Leaf instructions (Processor/Assembly)

I'm not sure if SO is the best place to ask this question. If not, please let me know which sister site I should go to. I've been reading a paper about Intel's Trusted Execution Technology (TXT) and it has the following text that I can't seem to…
recluze
  • 1,920
  • 4
  • 21
  • 34
2
votes
1 answer

Simulate a simple Graphic Card

Ok.I can find simulation designs for simple architectures.(Edit :definitely like not x86) For example use an int as the program counter , use a byte array as the Memory and so on.But how can I simulate the graphic card's(the simplest graphic card…
Dinushan
  • 2,067
  • 6
  • 30
  • 47
2
votes
1 answer

Arm64: What's the meaning of "HINT 0x1b" and "HINT 0x1F"?

In the disassembly of my C++ code, I see that in the prolog of the function, MSVC adds an initial HINT instruction such as: HINT #0x1B STP X29, X30, [SP,#-0x10+var_s0]! ... ... And in the prolog of the function I see: HINT …
raff
  • 339
  • 2
  • 12
2
votes
1 answer

What does the "P" prefix stand for in the x86 instruction PCLMULQDQ?

In the Carry-less Multiplication x86 instruction, PCLMULQDQ, what does the "P" prefix stand for? I've looked in these sources, but none of them explain the…
Steve Ward
  • 486
  • 4
  • 11
2
votes
1 answer

x86 rep prefix with a count of zero: what happens?

What happens for an initial count of zero for an x86 rep prefix? Intel's manual says explicitly it’s a while count != 0 loop with the test at the top, which is the sane expected behaviour. But most of the many vague reports I’ve seen elsewhere…
Cecil Ward
  • 597
  • 2
  • 13
2
votes
0 answers

Instruction set: how to test an external library

Depending on the CPU architecture, some computers can run software with some specific instruction set. Using these instructions can greatly improve the speed of the program, but can also lead to crashes when not supported. But sometimes, when…
Emile D.
  • 602
  • 2
  • 11
  • 20
2
votes
0 answers

Can the next-generation intel compiler add code-paths for multiple instruction sets?

The Intel Classic Compiler had a compilation flag -ax which I'd use to generate additional code paths for multiple instructions sets, such as AVX512, which was very convenient as I'd only build and receive a single binary. With the next-generation…
Yattabyte
  • 1,280
  • 14
  • 28
2
votes
3 answers

Why can't we have a safe ISA?

Accroding to this paper: https://doi.org/10.1109/SP.2013.13, Memory corruption bugs are one of the oldest problems in computer security. The lack of memory safety and type safety has caused countless bugs, causing billions of dollars and huge…
2
votes
0 answers

Add floating point in instruction in x86-64 with general purpose register

This tutorial (https://www.tutorialspoint.com/assembly_programming/assembly_arithmetic_instructions) is just work in integer, doesn't work in double-precision floating point. It said I must use xmm register with addsd instruction. Actually yes it's…