BBC BASIC for Windows
Programming >> Libraries >> New ASMLIB2 library
http://bb4w.conforums.com/index.cgi?board=libraries&action=display&num=1284108422

New ASMLIB2 library
Post by admin on Sep 10th, 2010, 08:47am

I have released this new BB4W library:

http://groups.yahoo.com/group/bb4w/files/Libraries/ASMLIB2.BBC

This is a superset of the ASMLIB library and supports SSE2 instructions in addition to the CMOV and SSE instructions. The new instructions supported include:

  1. SIMD floating-point instructions operating on two 64-bit 'doubles'.
  2. SIMD integer instructions operating on the extended (XMM) registers.
  3. New MMX instructions provided with SSE2 (paddq, psubq, pmuludq).
  4. Miscellaneous SSE2 instructions (clflush, lfence, mfence, pause).
To test for the availability of SSE2 instructions use:

Code:
      IF FN_cpuid(1, cpuid{}) IF cpuid.D% AND &4000000 THEN
        REM SSE2 instructions available
      ELSE
        REM SSE2 instructions not available
      ENDIF 

Richard.