Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9131939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:13:33+00:00 2026-06-17T08:13:33+00:00

When writing in a language such as C, the compiler theoretically takes your human

  • 0

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 implemented for the CPU in some sort of hard-wired way, yet it seems that different CPUs can implement the same ISA in different ways, say x86.

Does this mean that an ISA essentially acts as an abstraction layer for the hardware? x86 says: These are the standard instructions that I offer – you don’t need to know HOW the hardware does it, just know that it does and you can use them by sending me the following machine code?

Thus, if I were to construct a new CPU and I implemented my CPU in such a way that it followed the x86 standard, I would not need to write a compiler specific to my hardware, but that any compiler which compiled from C to the x86 ISA would be sufficient for my new CPU?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:13:34+00:00Added an answer on June 17, 2026 at 8:13 am

    Yes, the x86 architecture is well documented and forms an abstraction layer. However, an optimizing compiler can do better if it understands load-use delays, the number of load-store units, the number and types of computational units, cache sizes and cache lines; the number of internal registers, some processors do more reordering of the instruction stream, etc.; these things being implementation-specific.

    For example, an older processor might have only one integer multiplication unit, a newer one might have two (a really old one might have none, I worked on one such, though was not x86). Their types might also differ. These differences alter the balance between speed-space tradeoffs in optimization/code generation, so a strategy that knows which is which may use different instruction sequences. For example, a multiply by a large constant is probably shortest using the multiply instruction, but could be slower or faster than several shift and add operations, depending on the underlying implementation. So, the compiler has some choices to make, and since it can keep track of a lot of state about the code it is writing, it can use rather complex decision strategies.

    Another common optimization strategy is to interleave two or more different computations; this so as to keep the processor more busy. To do this often increases the number of registers needed, and may even require more instructions, and could be quicker yet longer or not depending again on the underlying implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a meta-language for writing markup code (such as xml and
I am writing some Natural Language Processing code and want to have a binary
I am writing a compiler for a c-like language. Currently, the compiler supports arrays
I'm writing a PLC language interpreter using C#. My interpreter has its own type
LaTeX is a wonderful language for writing documents. With the hyperref package and pdflatex
We want to design a simple domain specific language for writing test scripts to
Writing my first C# application...never touched the language before and not much of a
I am writing my own programming language just for the fun of it. Currently
I'm writing a small interpreter for a simple BASIC like language as an exercise
I'm writing a converter between some dialects of the same programming language. I've found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.