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 8705253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:18:52+00:00 2026-06-13T03:18:52+00:00

Here is a very small source file in D: void main() { } and

  • 0

Here is a very small source file in D:

void main()
{
}

and here objdump’s disassembly of the .o file:

Disassembly of section .text._Dmain:
0000000000000000 <_Dmain>:
void main()
   0:   55                      push   %rbp
   1:   48 8b ec                mov    %rsp,%rbp
   4:   31 c0                   xor    %eax,%eax
{
   6:   5d                      pop    %rbp
   7:   c3                      retq   

The compiler is DMD64 D Compiler v2.056 running on an x86_64 Linux machine.

What I wonder is why only 32-bit EAX is being cleared rather than the whole 64-bit RAX? I assume this is a return value, required just as in a C program even if not acknowledged in D source.

  • 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-13T03:18:53+00:00Added an answer on June 13, 2026 at 3:18 am
    xor    %eax,%eax
    

    DOES clear the entire rax in x64. Operation on the dword sized registers automatically clear the high dword of the full register.

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

Sidebar

Related Questions

I'm working with a very small sample project that can be downloaded from here
Very confused here, trying out the yuicompressor on a simple javascript file. My js
I made a research and all posts here are very blury regarding this issue.
Here is a very simple program: a = [[]]*3 print str(a) a[0].append(1) a[1].append(2) a[2].append(3)
Here's a very simple thing I'd like to do: when the pointer is within
Here is a very and straight forward question: How long will it take to
Here is a very basic class for handling sessions on App Engine: Lightweight implementation
Here's a very quick example for my problem: http://img19.imageshack.us/img19/3575/workertool.png (I'm not allowed to post
Here's a very simple program using the function: #include <windows.h> #include <tchar.h> #include <atlstr.h>
Very frustrated here. Can't get this to work and don't know why. I am

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.