;
; Реализация среды исполнения языка программирования
; Объектно-ориентированный продвинутый векторный транслятор
;
; Copyright © 2021, 2024 Малик Разработчик
;
; Это свободная программа: вы можете перераспространять ее и/или изменять
; ее на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
; в каком она была опубликована Фондом свободного программного обеспечения;
; либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.
;
; Эта программа распространяется в надежде, что она будет полезной,
; но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
; или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
; общественной лицензии GNU.
;
; Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
; вместе с этой программой. Если это не так, см.
; <https://www.gnu.org/licenses/>.
;
; <fold чтение полей инстанций>
; <fold приватные макросы — должны использоваться только этим текстом исходного кода>
macro _rdif {
_chknull r00q
lea r01q, [r00+$00]
}
macro _rdif_g globalmember* {
mov r01q, globalmember
_chknull r01q
}
; </fold>
; <fold объектная ссылка на аккумуляторе>
macro rdifr fieldFullName* {
_rdif
mov qsc0, [r01+fieldFullName]
tstincrcoth qsc0
decrcoth r01q
}
macro rdifc fieldFullName* {
_rdif
movzx dsc0, word [r01+fieldFullName]
decrcoth r01q
}
macro rdife fieldFullName* {
_rdif
fld tbyte [r01+fieldFullName]
decrcoth r01q
}
macro rdifd fieldFullName* {
_rdif
vmovq xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifd2 fieldFullName* {
_rdif
vmovdqa xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifd4 fieldFullName* {
_rdif
vmovdqu ymm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifd8 fieldFullName* {
_rdif
vmovdqu64 zmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdiff fieldFullName* {
_rdif
vmovd xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdiff2 fieldFullName* {
_rdif
vmovq xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdiff4 fieldFullName* {
_rdif
vmovdqa xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdiff8 fieldFullName* {
_rdif
vmovdqu ymm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifb fieldFullName* {
_rdif
movsx dsc0, byte [r01+fieldFullName]
decrcoth r01q
}
macro rdifb2 fieldFullName* {
_rdif
movzx dsc0, word [r01+fieldFullName]
vmovd xmm0, dsc0
decrcoth r01q
}
macro rdifb4 fieldFullName* {
_rdif
vmovd xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifb8 fieldFullName* {
_rdif
vmovq xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifs fieldFullName* {
_rdif
movsx dsc0, word [r01+fieldFullName]
decrcoth r01q
}
macro rdifs2 fieldFullName* {
_rdif
vmovd xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifs4 fieldFullName* {
_rdif
vmovq xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifs8 fieldFullName* {
_rdif
vmovdqa xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifi fieldFullName* {
_rdif
mov dsc0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifi2 fieldFullName* {
_rdif
vmovq xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifi4 fieldFullName* {
_rdif
vmovdqa xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifi8 fieldFullName* {
_rdif
vmovdqu ymm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifl fieldFullName* {
_rdif
mov qsc0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifl2 fieldFullName* {
_rdif
vmovdqa xmm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifl4 fieldFullName* {
_rdif
vmovdqu ymm0, [r01+fieldFullName]
decrcoth r01q
}
macro rdifl8 fieldFullName* {
_rdif
vmovdqu64 zmm0, [r01+fieldFullName]
decrcoth r01q
}
; </fold>
; <fold объектная ссылка в локальной переменной>
macro rdifr_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
mov qsc0, [r01+fieldFullName]
tstincrcoth qsc0
}
macro rdifc_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
movzx dsc0, word [r01+fieldFullName]
}
macro rdife_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
fld tbyte [r01+fieldFullName]
}
macro rdifd_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovq xmm0, [r01+fieldFullName]
}
macro rdifd2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqa xmm0, [r01+fieldFullName]
}
macro rdifd4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu ymm0, [r01+fieldFullName]
}
macro rdifd8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu64 zmm0, [r01+fieldFullName]
}
macro rdiff_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovd xmm0, [r01+fieldFullName]
}
macro rdiff2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovq xmm0, [r01+fieldFullName]
}
macro rdiff4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqa xmm0, [r01+fieldFullName]
}
macro rdiff8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu ymm0, [r01+fieldFullName]
}
macro rdifb_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
movsx dsc0, byte [r01+fieldFullName]
}
macro rdifb2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
movzx dsc0, word [r01+fieldFullName]
vmovd xmm0, dsc0
}
macro rdifb4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovd xmm0, [r01+fieldFullName]
}
macro rdifb8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovq xmm0, [r01+fieldFullName]
}
macro rdifs_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
movsx dsc0, word [r01+fieldFullName]
}
macro rdifs2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovd xmm0, [r01+fieldFullName]
}
macro rdifs4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovq xmm0, [r01+fieldFullName]
}
macro rdifs8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqa xmm0, [r01+fieldFullName]
}
macro rdifi_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
mov dsc0, [r01+fieldFullName]
}
macro rdifi2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovq xmm0, [r01+fieldFullName]
}
macro rdifi4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqa xmm0, [r01+fieldFullName]
}
macro rdifi8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu ymm0, [r01+fieldFullName]
}
macro rdifl_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
mov qsc0, [r01+fieldFullName]
}
macro rdifl2_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqa xmm0, [r01+fieldFullName]
}
macro rdifl4_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu ymm0, [r01+fieldFullName]
}
macro rdifl8_l fieldFullName*, localvarName* {
_loadw_l r01q, localvarName
vmovdqu64 zmm0, [r01+fieldFullName]
}
; </fold>
; <fold объектная ссылка в глобальном члене>
macro rdifr_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
mov qsc0, [globalmember+fieldFullName]
tstincrcoth qsc0
else
_rdif_g globalmember
mov qsc0, [r01+fieldFullName]
tstincrcoth qsc0
end if
}
macro rdifc_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
movzx dsc0, word [globalmember+fieldFullName]
else
_rdif_g globalmember
movzx dsc0, word [r01+fieldFullName]
end if
}
macro rdife_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
fld tbyte [globalmember+fieldFullName]
else
_rdif_g globalmember
fld tbyte [r01+fieldFullName]
end if
}
macro rdifd_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovq xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovq xmm0, [r01+fieldFullName]
end if
}
macro rdifd2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqa xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqa xmm0, [r01+fieldFullName]
end if
}
macro rdifd4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu ymm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu ymm0, [r01+fieldFullName]
end if
}
macro rdifd8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu64 zmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu64 zmm0, [r01+fieldFullName]
end if
}
macro rdiff_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovd xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovd xmm0, [r01+fieldFullName]
end if
}
macro rdiff2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovq xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovq xmm0, [r01+fieldFullName]
end if
}
macro rdiff4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqa xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqa xmm0, [r01+fieldFullName]
end if
}
macro rdiff8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu ymm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu ymm0, [r01+fieldFullName]
end if
}
macro rdifb_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
movsx dsc0, byte [globalmember+fieldFullName]
else
_rdif_g globalmember
movsx dsc0, byte [r01+fieldFullName]
end if
}
macro rdifb2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
movzx dsc0, word [globalmember+fieldFullName]
vmovd xmm0, dsc0
else
_rdif_g globalmember
movzx dsc0, word [r01+fieldFullName]
vmovd xmm0, dsc0
end if
}
macro rdifb4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovd xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovd xmm0, [r01+fieldFullName]
end if
}
macro rdifb8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovq xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovq xmm0, [r01+fieldFullName]
end if
}
macro rdifs_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
movsx dsc0, word [globalmember+fieldFullName]
else
_rdif_g globalmember
movsx dsc0, word [r01+fieldFullName]
end if
}
macro rdifs2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovd xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovd xmm0, [r01+fieldFullName]
end if
}
macro rdifs4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovq xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovq xmm0, [r01+fieldFullName]
end if
}
macro rdifs8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqa xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqa xmm0, [r01+fieldFullName]
end if
}
macro rdifi_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
mov dsc0, [globalmember+fieldFullName]
else
_rdif_g globalmember
mov dsc0, [r01+fieldFullName]
end if
}
macro rdifi2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovq xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovq xmm0, [r01+fieldFullName]
end if
}
macro rdifi4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqa xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqa xmm0, [r01+fieldFullName]
end if
}
macro rdifi8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu ymm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu ymm0, [r01+fieldFullName]
end if
}
macro rdifl_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
mov qsc0, [globalmember+fieldFullName]
else
_rdif_g globalmember
mov qsc0, [r01+fieldFullName]
end if
}
macro rdifl2_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqa xmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqa xmm0, [r01+fieldFullName]
end if
}
macro rdifl4_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu ymm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu ymm0, [r01+fieldFullName]
end if
}
macro rdifl8_g fieldFullName*, globalmember* {
if(globalmember eq null)
_throw NullPointerException
else if(globalmember eqtype avt.lang.Object)
vmovdqu64 zmm0, [globalmember+fieldFullName]
else
_rdif_g globalmember
vmovdqu64 zmm0, [r01+fieldFullName]
end if
}
; </fold>
; </fold>