How use 64bit memory space

Bare metal programming in PureBasic, for experienced users
User avatar
oryaaaaa
Enthusiast
Enthusiast
Posts: 791
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

How use 64bit memory space

Post by oryaaaaa »

I want to convert 64bit process. Now, Allocate memory size 8GB crushed.

32bit process

Code: Select all

Procedure LPF201(*buffer_audio_ptr, *lpf_table_ptr, *out_buffer_ptr)
  ;/ http://forum.purebasic.com/english/viewtopic.php?f=35&t=47679
  ; Thanks "Wilbert in Netherlands"
  !MOV Ecx, [p.p_lpf_table_ptr]
  !MOV Edx, [p.p_buffer_audio_ptr]
  !SUB Edx, 800
  !PXOR xmm2, xmm2
  
  !MOV Eax, 201
  !align 4
  !SincInterLoop3:
  
  !movq xmm0, [Ecx] ; sinc
  !movlhps xmm0, xmm0
  !cvtps2pd xmm1, [Edx] ; L + R
  !mulpd xmm1, xmm0
  !ADDPD xmm2, xmm1
  !ADD Ecx, 8
  !ADD Edx, 8
  
  !DEC Eax
  !JNZ SincInterLoop3
  
  !cvtpd2ps xmm2, xmm2
  !MOV Edx, [p.p_out_buffer_ptr]
  !movq [Edx], xmm2
EndProcedure
Thank you
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: How use 64bit memory space

Post by wilbert »

Changing all Ecx to Rcx and Edx to Rdx should be enough.
Windows (x64)
Raspberry Pi OS (Arm64)
Post Reply