Re: Understanding disassembly x86 + understanding function call + parameter pass and stack frame

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 14 Aug 2013 15:51:20 +0530, nidhi mittal hada said:

> *for x86_64 architecture and linux as operating system , GCC as compiler ,
> the calling convention to be followed is AMD64 ABI.*
> right?
>
> *My doubt is :-*
> 1) Is the above statement true only for stack frames function call etc ?
> OR
> Is the above statement true for other things related to architecture,
> like for knowing data type sizes, endianness, alignment ..
>
> as http://www.uclibc.org/docs/psABI-x86_64.pdf, mentions , data type size
> alignment etc everything ...
> are these things same for AMD and x86 architecture both ???

AMD developed the 64-bit extensions, Intel adopted them as well. The two
architectures are identical for alignment, word sizes, opcodes, and all that
stuff, until you get to truly processor-dependent things like whether it has
SSE3, SSE4, SSE42 extension opcodes, specific MSRs that are only available on
certain family/model/stepping, and so on.  So unless you're looking at *very
specific* things like "Does this particular Intel i5 chipset have the VT-D
extension?" or "how does this CPU handle on the fly firmware updates?" you can
treat the AMD and Intel 64-bit architectures the same.  By the time you're
looking at *that* level of detail, there's more difference between an Intel
Atom N4xx and an Intel Sandy Bridge-based Xeon than there is between Intel and
AMD, even though they're all able to run x86_64.

And if you're doing *that* sort of coding, you want to go look at how
the code that handles the /proc/cpuinfo pseudo-file handles the the
'flags' line, and how code uses the bits presented there, and how the
kernel determines which cpufreq driver to use, and so on...


Attachment: pgp_6BxuOu1t2.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux