From: <abe...@us...> - 2010-02-21 15:25:05
|
Revision: 1305 http://graphics32.svn.sourceforge.net/graphics32/?rev=1305&view=rev Author: abeckedorf Date: 2010-02-21 15:24:57 +0000 (Sun, 21 Feb 2010) Log Message: ----------- * Removed Delphi 5 support; * Cleaned up asm code; * Changed MMF from copy-on-write to all-access mode; * Fixed issue with D7 personal edition in SmartAssign. Modified Paths: -------------- trunk/Source/GR32.inc trunk/Source/GR32.pas trunk/Source/GR32_Backends_Generic.pas trunk/Source/GR32_Blend.pas trunk/Source/GR32_Containers.pas trunk/Source/GR32_Dsgn_Bitmap.dfm trunk/Source/GR32_Dsgn_Bitmap.pas trunk/Source/GR32_Dsgn_Color.pas trunk/Source/GR32_Dsgn_Misc.pas trunk/Source/GR32_Image.pas trunk/Source/GR32_LowLevel.pas trunk/Source/GR32_MicroTiles.pas trunk/Source/GR32_Reg.pas trunk/Source/GR32_Resamplers.pas trunk/Source/GR32_XPThemes.pas Modified: trunk/Source/GR32.inc =================================================================== --- trunk/Source/GR32.inc 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32.inc 2010-02-21 15:24:57 UTC (rev 1305) @@ -36,13 +36,11 @@ {$DEFINE INLININGSUPPORTED} {$DEFINE COMPILER2010} {$DEFINE COMPILER2009} - {$DEFINE COMPILER2007} + {$DEFINE COMPILER2007} {$DEFINE COMPILER2006} {$DEFINE COMPILER2005} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI2010} {$ELSE} @@ -53,13 +51,11 @@ {$IFDEF VER200} {$DEFINE INLININGSUPPORTED} {$DEFINE COMPILER2009} - {$DEFINE COMPILER2007} + {$DEFINE COMPILER2007} {$DEFINE COMPILER2006} {$DEFINE COMPILER2005} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI2009} {$ELSE} @@ -74,8 +70,6 @@ {$DEFINE COMPILER2005} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI2007} {$ELSE} @@ -89,8 +83,6 @@ {$DEFINE COMPILER2005} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI2006} {$ELSE} @@ -103,8 +95,6 @@ {$DEFINE COMPILER2005} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI2005} {$ELSE} @@ -115,8 +105,6 @@ {$IFDEF VER150} {$DEFINE COMPILER7} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI7} {$ELSE} @@ -126,8 +114,6 @@ {$IFDEF VER140} {$DEFINE COMPILER6} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} {$IFNDEF BCB} {$DEFINE DELPHI6} {$ELSE} @@ -135,30 +121,7 @@ {$ENDIF} {$ENDIF} -{$IFDEF VER130} - {$DEFINE COMPILER5} - {$DEFINE COMPILER4} - {$IFNDEF BCB} - {$DEFINE DELPHI5} - {$DEFINE DELPHI4} - {$ELSE} - {$ObjExportAll On} - {$DEFINE BCB5} - {$DEFINE BCB4} - {$ENDIF} -{$ENDIF} -{$IFDEF VER125} - {$DEFINE COMPILER4} - {$DEFINE BCB4} -{$ENDIF} - -{$IFDEF VER120} - {$DEFINE COMPILER4} - {$DEFINE DELPHI4} -{$ENDIF} - - (* Symbol PUREPASCAL : Forces GR32 into pure pascal mode. Should be used only for testing and debugging purposes. @@ -173,7 +136,6 @@ {$ENDIF} {$IFDEF FPC} - {$DEFINE COMPILER4} {$DEFINE PLATFORM_INDEPENDENT} {$MODE Delphi} @@ -204,13 +166,14 @@ {$ENDIF} - -{$IFNDEF COMPILER4} +{$IFNDEF COMPILER6} +{$IFNDEF FPC} ////////////////////////////////////////////////////////////////////// -' Graphics32 may only be installed with Delphi 4, Delphi 5, ' -' Delphi6, Delphi7, C++ Builder 4, C++ Builder 5, C++Builder 6 or Lazarus! ' +' Graphics32 may only be installed with Delphi/BCB 6 (or higher) ' +' or Free Pascal / Lazarus ' ////////////////////////////////////////////////////////////////////// {$ENDIF} +{$ENDIF} {$IFDEF LINUX} {$IFNDEF FPC} @@ -299,14 +262,6 @@ {$DEFINE EXT_PROP_EDIT} {$ENDIF} -// enable support for MMX/SSE/SSE2 assembler code in the inline assember -{$IFDEF COMPILER6} - {$DEFINE ENHANCED_INLINE_ASSEMBLER} -{$ENDIF} -{$IFDEF COMPILER6} - {$DEFINE ENHANCED_INLINE_ASSEMBLER} -{$ENDIF} - {$IFNDEF FPC} {$DEFINE XPTHEMES} // enable support for windows xp themes {$ENDIF} Modified: trunk/Source/GR32.pas =================================================================== --- trunk/Source/GR32.pas 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32.pas 2010-02-21 15:24:57 UTC (rev 1305) @@ -5242,48 +5242,48 @@ {$IFDEF TARGET_x86} function Interpolator_MMX(WX_256, WY_256: Cardinal; C11, C21: PColor32): TColor32; asm - db $0F,$6F,$09 /// MOVQ MM1,[ECX] + MOVQ MM1,[ECX] MOV ECX,C21 - db $0F,$6F,$19 /// MOVQ MM3,[ECX] - db $0F,$6F,$D1 /// MOVQ MM2,MM1 - db $0F,$6F,$E3 /// MOVQ MM4,MM3 - db $0F,$73,$D1,$20 /// PSRLQ MM1,32 - db $0F,$73,$D3,$20 /// PSRLQ MM3,32 + MOVQ MM3,[ECX] + MOVQ MM2,MM1 + MOVQ MM4,MM3 + PSRLQ MM1,32 + PSRLQ MM3,32 - db $0F,$6E,$E8 /// MOVD MM5,EAX - db $0F,$61,$ED /// PUNPCKLWD MM5,MM5 - db $0F,$62,$ED /// PUNPCKLDQ MM5,MM5 + MOVD MM5,EAX + PUNPCKLWD MM5,MM5 + PUNPCKLDQ MM5,MM5 - db $0F,$EF,$C0 /// PXOR MM0, MM0 + PXOR MM0, MM0 - db $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - db $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - db $0F,$F9,$D1 /// PSUBW MM2,MM1 - db $0F,$D5,$D5 /// PMULLW MM2,MM5 - db $0F,$71,$F1,$08 /// PSLLW MM1,8 - db $0F,$FD,$D1 /// PADDW MM2,MM1 - db $0F,$71,$D2,$08 /// PSRLW MM2,8 + PUNPCKLBW MM1,MM0 + PUNPCKLBW MM2,MM0 + PSUBW MM2,MM1 + PMULLW MM2,MM5 + PSLLW MM1,8 + PADDW MM2,MM1 + PSRLW MM2,8 - db $0F,$60,$D8 /// PUNPCKLBW MM3,MM0 - db $0F,$60,$E0 /// PUNPCKLBW MM4,MM0 - db $0F,$F9,$E3 /// PSUBW MM4,MM3 - db $0F,$D5,$E5 /// PMULLW MM4,MM5 - db $0F,$71,$F3,$08 /// PSLLW MM3,8 - db $0F,$FD,$E3 /// PADDW MM4,MM3 - db $0F,$71,$D4,$08 /// PSRLW MM4,8 + PUNPCKLBW MM3,MM0 + PUNPCKLBW MM4,MM0 + PSUBW MM4,MM3 + PMULLW MM4,MM5 + PSLLW MM3,8 + PADDW MM4,MM3 + PSRLW MM4,8 - db $0F,$6E,$EA /// MOVD MM5,EDX - db $0F,$61,$ED /// PUNPCKLWD MM5,MM5 - db $0F,$62,$ED /// PUNPCKLDQ MM5,MM5 + MOVD MM5,EDX + PUNPCKLWD MM5,MM5 + PUNPCKLDQ MM5,MM5 - db $0F,$F9,$D4 /// PSUBW MM2,MM4 - db $0F,$D5,$D5 /// PMULLW MM2,MM5 - db $0F,$71,$F4,$08 /// PSLLW MM4,8 - db $0F,$FD,$D4 /// PADDW MM2,MM4 - db $0F,$71,$D2,$08 /// PSRLW MM2,8 + PSUBW MM2,MM4 + PMULLW MM2,MM5 + PSLLW MM4,8 + PADDW MM2,MM4 + PSRLW MM2,8 - db $0F,$67,$D0 /// PACKUSWB MM2,MM0 - db $0F,$7E,$D0 /// MOVD EAX,MM2 + PACKUSWB MM2,MM0 + MOVD EAX,MM2 end; {$ENDIF} Modified: trunk/Source/GR32_Backends_Generic.pas =================================================================== --- trunk/Source/GR32_Backends_Generic.pas 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32_Backends_Generic.pas 2010-02-21 15:24:57 UTC (rev 1305) @@ -136,7 +136,7 @@ procedure TMMFBackend.InitializeSurface(NewWidth, NewHeight: Integer; ClearBuffer: Boolean); begin CreateFileMapping(FMapHandle, FMapFileHandle, FMapFileName, FMapIsTemporary, NewWidth, NewHeight); - FBits := MapViewOfFile(FMapHandle, FILE_MAP_COPY, 0, 0, 0); + FBits := MapViewOfFile(FMapHandle, FILE_MAP_ALL_ACCESS, 0, 0, 0); if not Assigned(FBits) then raise Exception.Create('Failed to map view of file.'); Modified: trunk/Source/GR32_Blend.pas =================================================================== --- trunk/Source/GR32_Blend.pas 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32_Blend.pas 2010-02-21 15:24:57 UTC (rev 1305) @@ -1107,11 +1107,7 @@ procedure EMMS_MMX; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} EMMS - {$ELSE} - DB $0F,$77 /// EMMS - {$ENDIF} end; procedure GenAlphaTable; @@ -1152,47 +1148,27 @@ // ECX - Weight of X [0..255] // Result := W * (X - Y) + Y - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM1,EAX PXOR MM0,MM0 - {$ELSE} - DB $0F,$6E,$C8 /// MOVD MM1,EAX - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - {$ENDIF} SHL ECX,3 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + MOVD MM2,EDX PUNPCKLBW MM1,MM0 PUNPCKLBW MM2,MM0 - {$ELSE} - DB $0F,$6E,$D2 /// MOVD MM2,EDX - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - {$ENDIF} + ADD ECX,alpha_ptr - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + PSUBW MM1,MM2 PMULLW MM1,[ECX] PSLLW MM2,8 - {$ELSE} - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$09 /// PMULLW MM1,[ECX] - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - {$ENDIF} + MOV ECX,bias_ptr - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + PADDW MM2,[ECX] PADDW MM1,MM2 PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD EAX,MM1 - {$ELSE} - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$C8 /// MOVD EAX,MM1 - {$ENDIF} end; procedure CombineMem_MMX(F: TColor32; var B: TColor32; W: TColor32); @@ -1206,47 +1182,29 @@ CMP ECX,$FF JZ @2 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM1,EAX PXOR MM0,MM0 - {$ELSE} - DB $0F,$6E,$C8 /// MOVD MM1,EAX - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - {$ENDIF} + SHL ECX,3 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + MOVD MM2,[EDX] PUNPCKLBW MM1,MM0 PUNPCKLBW MM2,MM0 - {$ELSE} - DB $0F,$6E,$12 /// MOVD MM2,[EDX] - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - {$ENDIF} + ADD ECX,alpha_ptr - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + PSUBW MM1,MM2 PMULLW MM1,[ECX] PSLLW MM2,8 - {$ELSE} - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$09 /// PMULLW MM1,[ECX] - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - {$ENDIF} + MOV ECX,bias_ptr - {$IFDEF ENHANCED_INLINE_ASSEMBLER} + PADDW MM2,[ECX] PADDW MM1,MM2 PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD [EDX],MM1 - {$ELSE} - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$0A /// MOVD [EDX],MM1 - {$ENDIF} + @1: RET @2: MOV [EDX],EAX @@ -1259,7 +1217,6 @@ // EAX <- F // EDX <- B // Result := Fa * (Frgb - Brgb) + Brgb - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX PXOR MM3,MM3 MOVD MM2,EDX @@ -1277,25 +1234,6 @@ PSRLW MM2,8 PACKUSWB MM2,MM3 MOVD EAX,MM2 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$EF,$DB /// PXOR MM3,MM3 - DB $0F,$6E,$D2 /// MOVD MM2,EDX - DB $0F,$60,$C3 /// PUNPCKLBW MM0,MM3 - MOV ECX,bias_ptr - DB $0F,$60,$D3 /// PUNPCKLBW MM2,MM3 - DB $0F,$6F,$C8 /// MOVQ MM1,MM0 - DB $0F,$69,$C9 /// PUNPCKHWD MM1,MM1 - DB $0F,$F9,$C2 /// PSUBW MM0,MM2 - DB $0F,$6A,$C9 /// PUNPCKHDQ MM1,MM1 - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - DB $0F,$D5,$C1 /// PMULLW MM0,MM1 - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$D0 /// PADDW MM2,MM0 - DB $0F,$71,$D2,$08 /// PSRLW MM2,8 - DB $0F,$67,$D3 /// PACKUSWB MM2,MM3 - DB $0F,$7E,$D0 /// MOVD EAX,MM2 - {$ENDIF} end; procedure BlendMem_MMX(F: TColor32; var B: TColor32); @@ -1309,7 +1247,6 @@ CMP EAX,$FF000000 JNC @2 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM3,MM3 MOVD MM0,EAX MOVD MM2,[EDX] @@ -1327,25 +1264,7 @@ PSRLW MM2,8 PACKUSWB MM2,MM3 MOVD [EDX],MM2 - {$ELSE} - DB $0F,$EF,$DB /// PXOR MM3,MM3 - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$12 /// MOVD MM2,[EDX] - DB $0F,$60,$C3 /// PUNPCKLBW MM0,MM3 - MOV ECX,bias_ptr - DB $0F,$60,$D3 /// PUNPCKLBW MM2,MM3 - DB $0F,$6F,$C8 /// MOVQ MM1,MM0 - DB $0F,$69,$C9 /// PUNPCKHWD MM1,MM1 - DB $0F,$F9,$C2 /// PSUBW MM0,MM2 - DB $0F,$6A,$C9 /// PUNPCKHDQ MM1,MM1 - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - DB $0F,$D5,$C1 /// PMULLW MM0,MM1 - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$D0 /// PADDW MM2,MM0 - DB $0F,$71,$D2,$08 /// PSRLW MM2,8 - DB $0F,$67,$D3 /// PACKUSWB MM2,MM3 - DB $0F,$7E,$12 /// MOVD [EDX],MM2 - {$ENDIF} + @1: RET @2: MOV [EDX],EAX @@ -1367,7 +1286,6 @@ SHR ECX,8 JZ @1 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM0,MM0 MOVD MM1,EAX SHL ECX,3 @@ -1384,24 +1302,6 @@ PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD EAX,MM1 - {$ELSE} - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - DB $0F,$6E,$C8 /// MOVD MM1,EAX - SHL ECX,3 - DB $0F,$6E,$D2 /// MOVD MM2,EDX - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - ADD ECX,alpha_ptr - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$09 /// PMULLW MM1,[ECX] - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - MOV ECX,bias_ptr - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$C8 /// MOVD EAX,MM1 - {$ENDIF} POP EBX RET @@ -1429,7 +1329,6 @@ SHR ECX,8 JZ @1 - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM0,MM0 MOVD MM1,EAX SHL ECX,3 @@ -1446,25 +1345,9 @@ PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD [EDX],MM1 - {$ELSE} - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - DB $0F,$6E,$C8 /// MOVD MM1,EAX - SHL ECX,3 - DB $0F,$6E,$12 /// MOVD MM2,[EDX] - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - ADD ECX,alpha_ptr - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$09 /// PMULLW MM1,[ECX] - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - MOV ECX,bias_ptr - DB $0F,$FD,$11 /// PADDW MM2,[ECX] - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$0A /// MOVD [EDX],MM1 - {$ENDIF} + @1: POP EBX + @2: end; @@ -1492,7 +1375,6 @@ JNC @2 // opaque pixel, copy without blending // blend - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX PXOR MM3,MM3 MOVD MM2,[EDI] @@ -1510,25 +1392,6 @@ PSRLW MM2,8 PACKUSWB MM2,MM3 MOVD EAX,MM2 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$EF,$DB /// PXOR MM3,MM3 - DB $0F,$6E,$17 /// MOVD MM2,[EDI] - DB $0F,$60,$C3 /// PUNPCKLBW MM0,MM3 - MOV EAX,bias_ptr - DB $0F,$60,$D3 /// PUNPCKLBW MM2,MM3 - DB $0F,$6F,$C8 /// MOVQ MM1,MM0 - DB $0F,$69,$C9 /// PUNPCKHWD MM1,MM1 - DB $0F,$F9,$C2 /// PSUBW MM0,MM2 - DB $0F,$6A,$C9 /// PUNPCKHDQ MM1,MM1 - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - DB $0F,$D5,$C1 /// PMULLW MM0,MM1 - DB $0F,$FD,$10 /// PADDW MM2,[EAX] - DB $0F,$FD,$D0 /// PADDW MM2,MM0 - DB $0F,$71,$D2,$08 /// PSRLW MM2,8 - DB $0F,$67,$D3 /// PACKUSWB MM2,MM3 - DB $0F,$7E,$D0 /// MOVD EAX,MM2 - {$ENDIF} @2: MOV [EDI],EAX @@ -1575,7 +1438,6 @@ JZ @3 // complete transparency, proceed to next point // blend - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM0,MM0 MOVD MM1,EAX SHL EBX,3 @@ -1592,24 +1454,6 @@ PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD EAX,MM1 - {$ELSE} - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - DB $0F,$6E,$C8 /// MOVD MM1,EAX - SHL EBX,3 - DB $0F,$6E,$17 /// MOVD MM2,[EDI] - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - ADD EBX,alpha_ptr - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$0B /// PMULLW MM1,[EBX] - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - MOV EBX,bias_ptr - DB $0F,$FD,$13 /// PADDW MM2,[EBX] - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$C8 /// MOVD EAX,MM1 - {$ENDIF} @2: MOV [EDI],EAX @@ -1648,12 +1492,11 @@ SHL EBX,3 ADD EBX,alpha_ptr - DB $0F,$6F,$1B /// MOVQ MM3,[EBX] + MOVQ MM3,[EBX] MOV EBX,bias_ptr - DB $0F,$6F,$23 /// MOVQ MM4,[EBX] + MOVQ MM4,[EBX] // loop start - {$IFDEF ENHANCED_INLINE_ASSEMBLER} @1: MOVD MM1,[EAX] PXOR MM0,MM0 MOVD MM2,[EDX] @@ -1669,24 +1512,7 @@ PSRLW MM1,8 PACKUSWB MM1,MM0 MOVD [EDX],MM1 - {$ELSE} -@1: DB $0F,$6E,$08 /// MOVD MM1,[EAX] - DB $0F,$EF,$C0 /// PXOR MM0,MM0 - DB $0F,$6E,$12 /// MOVD MM2,[EDX] - DB $0F,$60,$C8 /// PUNPCKLBW MM1,MM0 - DB $0F,$60,$D0 /// PUNPCKLBW MM2,MM0 - DB $0F,$F9,$CA /// PSUBW MM1,MM2 - DB $0F,$D5,$CB /// PMULLW MM1,MM3 - DB $0F,$71,$F2,$08 /// PSLLW MM2,8 - - DB $0F,$FD,$D4 /// PADDW MM2,MM4 - DB $0F,$FD,$CA /// PADDW MM1,MM2 - DB $0F,$71,$D1,$08 /// PSRLW MM1,8 - DB $0F,$67,$C8 /// PACKUSWB MM1,MM0 - DB $0F,$7E,$0A /// MOVD [EDX],MM1 - {$ENDIF} - ADD EAX,4 ADD EDX,4 @@ -1940,37 +1766,22 @@ {$IFDEF TARGET_x86} function ColorAdd_MMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX MOVD MM1,EDX PADDUSB MM0,MM1 MOVD EAX,MM0 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$DC,$C1 /// PADDUSB MM0,MM1 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorSub_MMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX MOVD MM1,EDX PSUBUSB MM0,MM1 MOVD EAX,MM0 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$D8,$C1 /// PSUBUSB MM0,MM1 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorModulate_MMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM2,MM2 MOVD MM0,EAX PUNPCKLBW MM0,MM2 @@ -1980,52 +1791,26 @@ PSRLW MM0,8 PACKUSWB MM0,MM2 MOVD EAX,MM0 - {$ELSE} - DB $0F,$EF,$D2 /// PXOR MM2,MM2 - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$60,$C2 /// PUNPCKLBW MM0,MM2 - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$60,$CA /// PUNPCKLBW MM1,MM2 - DB $0F,$D5,$C1 /// PMULLW MM0,MM1 - DB $0F,$71,$D0,$08 /// PSRLW MM0,8 - DB $0F,$67,$C2 /// PACKUSWB MM0,MM2 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorMax_EMMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX MOVD MM1,EDX PMAXUB MM0,MM1 MOVD EAX,MM0 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$DE,$C1 /// PMAXUB MM0,MM1 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorMin_EMMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX MOVD MM1,EDX PMINUB MM0,MM1 MOVD EAX,MM0 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$DA,$C1 /// PMINUB MM0,MM1 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorDifference_MMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} MOVD MM0,EAX MOVD MM1,EDX MOVQ MM2,MM0 @@ -2033,20 +1818,10 @@ PSUBUSB MM1,MM2 POR MM0,MM1 MOVD EAX,MM0 - {$ELSE} - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$6F,$D0 /// MOVQ MM2,MM0 - DB $0F,$D8,$C1 /// PSUBUSB MM0,MM1 - DB $0F,$D8,$CA /// PSUBUSB MM1,MM2 - DB $0F,$EB,$C1 /// POR MM0,MM1 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorExclusion_MMX(C1, C2: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM2,MM2 MOVD MM0,EAX PUNPCKLBW MM0,MM2 @@ -2059,25 +1834,10 @@ PSUBUSW MM0,MM1 PACKUSWB MM0,MM2 MOVD EAX,MM0 - {$ELSE} - DB $0F,$EF,$D2 /// PXOR MM2,MM2 - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$60,$C2 /// PUNPCKLBW MM0,MM2 - DB $0F,$6E,$CA /// MOVD MM1,EDX - DB $0F,$60,$CA /// PUNPCKLBW MM1,MM2 - DB $0F,$6F,$D8 /// MOVQ MM3,MM0 - DB $0F,$FD,$C1 /// PADDW MM0,MM1 - DB $0F,$D5,$CB /// PMULLW MM1,MM3 - DB $0F,$71,$D1,$07 /// PSRLW MM1,7 - DB $0F,$D9,$C1 /// PSUBUSW MM0,MM1 - DB $0F,$67,$C2 /// PACKUSWB MM0,MM2 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; function ColorScale_MMX(C, W: TColor32): TColor32; asm - {$IFDEF ENHANCED_INLINE_ASSEMBLER} PXOR MM2,MM2 SHL EDX,3 MOVD MM0,EAX @@ -2087,17 +1847,6 @@ PSRLW MM0,8 PACKUSWB MM0,MM2 MOVD EAX,MM0 - {$ELSE} - DB $0F,$EF,$D2 /// PXOR MM2,MM2 - SHL EDX,3 - DB $0F,$6E,$C0 /// MOVD MM0,EAX - DB $0F,$60,$C2 /// PUNPCKLBW MM0,MM2 - ADD EDX,alpha_ptr - DB $0F,$D5,$02 /// PMULLW MM0,[EDX] - DB $0F,$71,$D0,$08 /// PSRLW MM0,8 - DB $0F,$67,$C2 /// PACKUSWB MM0,MM2 - DB $0F,$7E,$C0 /// MOVD EAX,MM0 - {$ENDIF} end; {$ENDIF} Modified: trunk/Source/GR32_Containers.pas =================================================================== --- trunk/Source/GR32_Containers.pas 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32_Containers.pas 2010-02-21 15:24:57 UTC (rev 1305) @@ -45,17 +45,10 @@ {$ELSE} Windows, {$ENDIF} -{$IFDEF COMPILER6} RTLConsts, -{$ENDIF} GR32, SysUtils, GR32_LowLevel, Classes, TypInfo; -{$IFNDEF COMPILER6} const - SItemNotFound = 'Item not found ($0%x)'; -{$ENDIF} - -const BUCKET_MASK = $FF; BUCKET_COUNT = BUCKET_MASK + 1; // 256 buckets by default @@ -250,7 +243,7 @@ // Get the property list in an unsorted fashion. // This is important so the order in which the properties are defined is obeyed, // ie. mimic how the Delphi form loader would set the properties. - Count := GetPropList(Src.ClassInfo, TypeKinds, Props{$IFDEF COMPILER6}, False{$ENDIF}); + Count := GetPropList(Src.ClassInfo, TypeKinds, Props, False); for I := 0 to Count - 1 do with Props^[I]^ do @@ -265,7 +258,7 @@ if Assigned(SubSrc) then SubDst.Assign(SubSrc); end else - SetPropValue(Dst, string(Name), GetPropValue(Src, string(Name), False)); + SetPropValue(Dst, string(Name), GetPropValue(Src, string(Name), True)); end; finally FreeMem(Props, Count * SizeOf(PPropInfo)); Modified: trunk/Source/GR32_Dsgn_Bitmap.dfm =================================================================== --- trunk/Source/GR32_Dsgn_Bitmap.dfm 2010-02-21 02:47:31 UTC (rev 1304) +++ trunk/Source/GR32_Dsgn_Bitmap.dfm 2010-02-21 15:24:57 UTC (rev 1305) @@ -1,13 +1,12 @@ \xFF - |