amd64

Nov. 10th, 2010 12:06 am
ewx: (geek)
[personal profile] ewx

I’ve not written a nontrivial amount of assembler in over 15 years, but have over the past few days started doing some for a future version of my Mandelbrot set program.

A few random thoughts:

  • I did most of my assembler programming on the 68K, so the AT&T syntax preferred by gas (i.e. op src,dest) seems natural to me. But the AMD documentation uses the Intel syntax and turning everything back to front is mindbending, so I quickly gave up and switched to that.
    Fortunately there’s a .intel_syntax directive, and I did some Z80 long ago, so the Intel order isn’t wholely alien.
  • The MUL instruction’s a bit lame, isn’t it? The 68K could multiply any pair of registers (or in fact memory, for the source) and store the result in any register. Intel/AMD’s MUL fixes the destination and one of the inputs.
  • I was disappointed to find that there doesn’t seem to be a high precision integer multiply (128*128->256 would be just the ticket) in the SSEn instructions.

(no subject)

Date: 2010-11-10 09:33 am (UTC)
ext_8103: (Default)
From: [identity profile] ewx.livejournal.com
Unfortunately IMUL is a signed multiply and I need unsigned.

(no subject)

Date: 2010-11-10 09:48 am (UTC)
simont: A picture of me in 2016 (Default)
From: [personal profile] simont
Ah, drat. (Apparently I'm a bit rusty on this stuff myself. I used to know bloody everything about x86oids, though admittedly that was around the time IMUL was newfangled and weird.)

November 2025

S M T W T F S
      1
2345678
91011121314 15
1617 181920 2122
23242526272829
30      

Most Popular Tags

Expand Cut Tags

No cut tags