write.instance-field.inc

Переключить прокрутку окна
Загрузить этот исходный код

;
  ; Реализация среды исполнения языка программирования
  ; Объектно-ориентированный продвинутый векторный транслятор
  ;
  ; Copyright © 2021, 2024 Малик Разработчик
  ;
  ; Это свободная программа: вы можете перераспространять ее и/или изменять
  ; ее на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
  ; в каком она была опубликована Фондом свободного программного обеспечения;
  ; либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.
  ;
  ; Эта программа распространяется в надежде, что она будет полезной,
  ; но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
  ; или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
  ; общественной лицензии GNU.
  ;
  ; Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
  ; вместе с этой программой. Если это не так, см.
  ; <https://www.gnu.org/licenses/>.
;

; <fold запись полей инстанций>
    ; <fold объектная ссылка в локальной переменной>
        macro fwrifw_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        tstincrcobj qsc0
                        xchg        qword [r01+fieldFullName], qsc0
                        tstdecrcobj qsc0
                        frelease_o  localvarName
        }

        macro fwrifc_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        mov         word  [r01+fieldFullName], wsc0
                        frelease_o  localvarName
        }

        macro fwrife_l fieldFullName*, localvarName* {
                        _floadwe_l  r01q, localvarName
                        fstp        tbyte [r01+fieldFullName]
                        frelease_o  localvarName
        }

        macro fwrifd_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovq       qword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifd2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqa     xword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifd4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu     yword [r01+fieldFullName], ymm0
                        frelease_o  localvarName
        }

        macro fwrifd8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu64   zword [r01+fieldFullName], zmm0
                        frelease_o  localvarName
        }

        macro fwriff_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovd       dword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwriff2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovq       qword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwriff4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqa     xword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwriff8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu     yword [r01+fieldFullName], ymm0
                        frelease_o  localvarName
        }

        macro fwrifb_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        mov         byte  [r01+fieldFullName], bsc0
                        frelease_o  localvarName
        }

        macro fwrifb2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovd       dsc0, xmm0
                        mov         word  [r01+fieldFullName], wsc0
                        frelease_o  localvarName
        }

        macro fwrifb4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovd       dword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifb8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovq       qword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifs_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        mov         word  [r01+fieldFullName], wsc0
                        frelease_o  localvarName
        }

        macro fwrifs2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovd       dword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifs4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovq       qword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifs8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqa     xword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifi_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        mov         dword [r01+fieldFullName], dsc0
                        frelease_o  localvarName
        }

        macro fwrifi2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovq       qword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifi4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqa     xword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifi8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu     yword [r01+fieldFullName], ymm0
                        frelease_o  localvarName
        }

        macro fwrifl_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        mov         qword [r01+fieldFullName], qsc0
                        frelease_o  localvarName
        }

        macro fwrifl2_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqa     xword [r01+fieldFullName], xmm0
                        frelease_o  localvarName
        }

        macro fwrifl4_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu     yword [r01+fieldFullName], ymm0
                        frelease_o  localvarName
        }

        macro fwrifl8_l fieldFullName*, localvarName* {
                        _floadw_l   r01q, localvarName
                        vmovdqu64   zword [r01+fieldFullName], zmm0
                        frelease_o  localvarName
        }
    ; </fold>

    ; <fold объектная ссылка в глобальном члене>
        macro fwrifw_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            tstincrcobj qsc0
                            xchg        qword [globalmember+fieldFullName], qsc0
                            tstdecrcobj qsc0
            else
                            _floadw_g   r01q, globalmember
                            tstincrcobj qsc0
                            xchg        qword [r01+fieldFullName], qsc0
                            tstdecrcobj qsc0
            end if
        }

        macro fwrifc_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            mov         word  [globalmember+fieldFullName], wsc0
            else
                            _floadw_g   r01q, globalmember
                            mov         word  [r01+fieldFullName], wsc0
            end if
        }

        macro fwrife_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            releasee
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            fstp        tbyte [globalmember+fieldFullName]
            else
                            _floadwe_g  r01q, globalmember
                            fstp        tbyte [r01+fieldFullName]
            end if
        }

        macro fwrifd_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovq       qword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovq       qword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifd2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqa     xword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqa     xword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifd4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu     yword [globalmember+fieldFullName], ymm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu     yword [r01+fieldFullName], ymm0
            end if
        }

        macro fwrifd8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu64   zword [globalmember+fieldFullName], zmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu64   zword [r01+fieldFullName], zmm0
            end if
        }

        macro fwriff_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovd       dword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovd       dword [r01+fieldFullName], xmm0
            end if
        }

        macro fwriff2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovq       qword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovq       qword [r01+fieldFullName], xmm0
            end if
        }

        macro fwriff4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqa     xword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqa     xword [r01+fieldFullName], xmm0
            end if
        }

        macro fwriff8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu     yword [globalmember+fieldFullName], ymm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu     yword [r01+fieldFullName], ymm0
            end if
        }

        macro fwrifb_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            mov         byte  [globalmember+fieldFullName], bsc0
            else
                            _floadw_g   r01q, globalmember
                            mov         byte  [r01+fieldFullName], bsc0
            end if
        }

        macro fwrifb2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovd       dsc0, xmm0
                            mov         word  [globalmember+fieldFullName], wsc0
            else
                            _floadw_g   r01q, globalmember
                            vmovd       dsc0, xmm0
                            mov         word  [r01+fieldFullName], wsc0
            end if
        }

        macro fwrifb4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovd       dword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovd       dword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifb8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovq       qword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovq       qword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifs_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            mov         word  [globalmember+fieldFullName], wsc0
            else
                            _floadw_g   r01q, globalmember
                            mov         word  [r01+fieldFullName], wsc0
            end if
        }

        macro fwrifs2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovd       dword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovd       dword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifs4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovq       qword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovq       qword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifs8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqa     xword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqa     xword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifi_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            mov         dword [globalmember+fieldFullName], dsc0
            else
                            _floadw_g   r01q, globalmember
                            mov         dword [r01+fieldFullName], dsc0
            end if
        }

        macro fwrifi2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovq       qword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovq       qword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifi4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqa     xword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqa     xword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifi8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu     yword [globalmember+fieldFullName], ymm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu     yword [r01+fieldFullName], ymm0
            end if
        }

        macro fwrifl_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            mov         qword [globalmember+fieldFullName], qsc0
            else
                            _floadw_g   r01q, globalmember
                            mov         qword [r01+fieldFullName], qsc0
            end if
        }

        macro fwrifl2_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqa     xword [globalmember+fieldFullName], xmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqa     xword [r01+fieldFullName], xmm0
            end if
        }

        macro fwrifl4_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu     yword [globalmember+fieldFullName], ymm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu     yword [r01+fieldFullName], ymm0
            end if
        }

        macro fwrifl8_g fieldFullName*, globalmember* {
            if(globalmember eq null)
                            fthrow      NullPointerException
            else if(globalmember eqtype avt.lang.Object)
                            vmovdqu64   zword [globalmember+fieldFullName], zmm0
            else
                            _floadw_g   r01q, globalmember
                            vmovdqu64   zword [r01+fieldFullName], zmm0
            end if
        }
    ; </fold>
; </fold>