Compiling a program directly for the microarchitecture level

I'm studying computer architecture, I have a question. But first what did I understand:

The architecture of the instruction set is taken (the instruction set is assembly language for a specific processor?) that is, MOV, XOR, and , etc. , then these instructions are executed by the microarchitecture level, the data path (registers + arithmetic-logic device, this is done by the firmware or the microprocessor itself)

The question is whether the compiler can create code for run directly for the microarchitecture, bypassing the instruction set architecture? If I understand everything correctly, then no, because the microarchitecture is already a set of registers (a group of memory cells of 8, 16 or 32 bits) in each of which a certain instruction is written in the form of zeros and ones. Accordingly, for example, the C compiler will not be able to issue code (101111101011) that can execute a specific processor. Because first you will need to translate to the architecture of the processor instruction set, for example 8086. And then the microarchitecture itself interprets the code that it understands, you see MOV, XOR, etc.

Am I getting this right?

Author: Deleted, 2013-10-01

3 answers

This is an interesting question. And I think it mainly lies in whether there is and is open (available when the processor is inserted into a conventional serial motherboard) in modern processors an interface for directly loading sequences of micro-commands for execution. Who knows? Rather, no - why would intel or AMD open a low-level interface to third-party users? Just extra security holes. In terms of speed, it is unlikely that you will be able to win anything significant. Besides, programming in micro-commands is very likely to run into memory bandwidth. Because there are a lot of executive devices and for each clock cycle, you need to tell almost every one of them a new command.

Here is the probability that on a regular computer you can flash the microcode, i.e. the program in the processor that describes which micro commands each regular command is divided into, a little higher. But I would also bet that it is impossible.

Read it ru.wikipedia.org/wiki/Microcode, and even better-the English version.

Upd: although no, there are tools for the second one: "Intel has published a way that the OS or BIOS can update the microcode (this must be done after each reset - the changes are not saved), but the contents of the microcode are not documented. Moreover, it is encoded and hung with check summs." Intel® 64 and IA-32 Architectures Software Developer’s Manual

Https://stackoverflow.com/questions/4366837/what-is-intel-microcode

 1
Author: Михаил М, 2017-05-23 12:39:13

Processors have different modes of operation, which use different instructions. One of the primary modes in which other instructions are decoded. Decoders are implemented in iron, from transistors.

In PC processors, the presence of x86 and amd64 modes is associated with compatibility with older programs. The location of the decoder is a question, perhaps it faces the cache memory of programs.

Multi-mode operation of the processor is quite common.

The ARM7 processor has The main mode of operation is ARM32 and 16-bit Thumb mode, whose commands are twice as short and there are significantly fewer of them. This reduces the size of the code and does not affect performance in simple tasks.

 1
Author: Michael Menshikoff, 2015-10-08 15:16:46

Am I getting this right, bro?

Sorry, but this kind of communication can be annoying. I recommend getting rid of

At the heart of your question. My vision is this:

  1. We look at the problem we are solving and form a list of instructions that we need. They can be the same as in any other architecture, or they can be completely different. It all depends on the goals of the task that the microarchitecture designer solves
  2. They only think about the compiler when the design itself is already there. formed by
  3. We study a list of programming languages that can allow you to design your microarchitecture and the set of instructions that you designed to express in that language. For example, there are Verilog, VHDL.

And the most important question before you take on such a task: Does it really need to be addressed or is it just a fan?

I recommend reading Tanenbaum, a great kid and explains many things well!

 0
Author: sys_dev, 2013-10-02 08:32:06