Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
Am 03.05.2012 22:34, schrieb Torsten: While we follow only a few formatting rules in the compiler, I think this is very hard to read. - What does rax86.IntToStr? i need this for create warnings (check memory reference size) and i don't like include a rtl unit. SysUtils is already used in ~100 units in the compiler, so you can use it as well. Regards, Sven ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
04.05.2012 10:39, Sven Barth пишет: Am 03.05.2012 22:34, schrieb Torsten: While we follow only a few formatting rules in the compiler, I think this is very hard to read. - What does rax86.IntToStr? i need this for create warnings (check memory reference size) and i don't like include a rtl unit. SysUtils is already used in ~100 units in the compiler, so you can use it as well. The compiler itself uses tostr function from cutils unit. Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
Am 04.05.2012 10:27, schrieb Sergei Gorelkin: 04.05.2012 10:39, Sven Barth пишет: Am 03.05.2012 22:34, schrieb Torsten: While we follow only a few formatting rules in the compiler, I think this is very hard to read. - What does rax86.IntToStr? i need this for create warnings (check memory reference size) and i don't like include a rtl unit. SysUtils is already used in ~100 units in the compiler, so you can use it as well. The compiler itself uses tostr function from cutils unit. Not always. There are a few cases where IntToStr is used (I don't know whether by accident or on purpose). Though if the compiler contains a custom routine for that (in this case tostr) then this should be used, of course, Torsten. Regards, Sven ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
Am 03.05.2012 20:25, schrieb Florian Klämpfl: Comments: - I'am not happy with the new fields localvarsize and localconstoffset in rautils.toprrec. Increasing the size of toprrec will probably increase memory usage of the compiler, I also didn't get yet the use of the fields: localsym and localsymofs should allow to figure out the same? I need this to validate memory-reference-operands (only SSE- or AVX opcodes). Calculate the size of record-elements is impossible (with localsym) in Tx86Instruction.AddReferenceSize. Get the offset of record-elements is impossible (with localsymofs) in Tx86Instruction.AddReferenceSize. type TYMMWord = record i0: dword; i1: dword; i2: dword; i3: dword; i4: dword; i5: dword; i6: dword; i7: dword; end; datatyplocalvarsizetabstractnormalvarsym(localsym) localconstoffsetlocalsymofs byte11 word 22 dword 44 ... TYMMWord 3232 0 0 TYMMWord.i1 432 0 4 TYMMWord.i1 + 16 432 16 20 I have not simple idea how to use localsym and localsymofs to validate memory-reference-size. Besides this, the changes look already very good to me! Thanks ___ fpc-devel maillist -fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Torsten ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
Am 03.05.2012 22:01, schrieb Torsten: Am 03.05.2012 18:24, schrieb Florian Klämpfl: Am 03.05.2012 10:49, schrieb fck...@freenet.de: Hi, my Intel/AMD assembler AVX 1 support is ready for testing. svn checkout http://svn.freepascal.org/svn/fpc/branches/tg74/avx ... build compiler: ./compiler/make cycle I have testing under Linux (32/64) with internal assembler writer and external assembler writer gas Do you have any test files? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Hi Florian, i have 5 GByte testdata (64-bit). All opcode with all memory and register operands. Did you use some generator which you can provide so other people could generate the same testdate if needed? VADDPD XMM0, XMM0, XMM0 VADDPD XMM0, XMM0, XMM1 ... VADDPD XMM0, XMM0, [RAX + RAX] VADDPD XMM0, XMM0, [RAX + RAX * 2] VADDPD XMM0, XMM0, [RAX + RAX * 4] VADDPD XMM0, XMM0, [RAX + RAX * 8] VADDPD XMM0, XMM0, [RAX + RAX * 2 + 16] VADDPD XMM0, XMM0, [RAX + RAX * 4 + 32] VADDPD XMM0, XMM0, [RAX + RAX * 8 + 48] ... VADDPD YMM15, YMM15, [R15 + R15 * 8 + 48] = 44 MB filesize I have also build nasm assembler -file to compile with nasm and than i compare the binary output with a little tool (also compare fpc internal assembler result with the result of external assembler gas). Can you generate a smaller test selecting random instructions from this big test file (several 10k) so we can add it to the testsuite? See http://svn.freepascal.org/svn/fpc/trunk/tests/test/tasm2.pp how correct assembling can be automatically tests (the byte array is a dump of the file assembled by gas/nasm?) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation
Am 04.05.2012 21:29, schrieb Florian Klämpfl: Am 03.05.2012 22:01, schrieb Torsten: Am 03.05.2012 18:24, schrieb Florian Klämpfl: Am 03.05.2012 10:49, schrieb fck...@freenet.de: Hi, my Intel/AMD assembler AVX 1 support is ready for testing. svn checkout http://svn.freepascal.org/svn/fpc/branches/tg74/avx ... build compiler: ./compiler/make cycle I have testing under Linux (32/64) with internal assembler writer and external assembler writer gas Do you have any test files? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Hi Florian, i have 5 GByte testdata (64-bit). All opcode with all memory and register operands. Did you use some generator which you can provide so other people could generate the same testdate if needed? Yes, i can, but i need a little bit time for this. VADDPD XMM0, XMM0, XMM0 VADDPD XMM0, XMM0, XMM1 ... VADDPD XMM0, XMM0, [RAX + RAX] VADDPD XMM0, XMM0, [RAX + RAX * 2] VADDPD XMM0, XMM0, [RAX + RAX * 4] VADDPD XMM0, XMM0, [RAX + RAX * 8] VADDPD XMM0, XMM0, [RAX + RAX * 2 + 16] VADDPD XMM0, XMM0, [RAX + RAX * 4 + 32] VADDPD XMM0, XMM0, [RAX + RAX * 8 + 48] ... VADDPD YMM15, YMM15, [R15 + R15 * 8 + 48] = 44 MB filesize I have also build nasm assembler -file to compile with nasm and than i compare the binary output with a little tool (also compare fpc internal assembler result with the result of external assembler gas). Can you generate a smaller test selecting random instructions from this big test file (several 10k) so we can add it to the testsuite? See http://svn.freepascal.org/svn/fpc/trunk/tests/test/tasm2.pp how correct assembling can be automatically tests (the byte array is a dump of the file assembled by gas/nasm?) OK. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel Torsten ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] OpenBsd cross compiler
From: Leonardo M. Ramé martinr...@yahoo.com To: 'FPC developers' list' fpc-devel@lists.freepascal.org Sent: Saturday, April 28, 2012 8:38 AM Subject: Re: [fpc-devel] OpenBsd cross compiler From: Pierre Free Pascal pie...@freepascal.org To: 'Leonardo M. Ramé' martinr...@yahoo.com; 'FPC developers' list' fpc-devel@lists.freepascal.org Sent: Friday, April 27, 2012 11:20 AM Subject: RE: [fpc-devel] OpenBsd cross compiler Hi Leonardo, -Message d'origine- De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel- boun...@lists.freepascal.org] De la part de Leonardo M. Ramé Envoyé : jeudi 26 avril 2012 21:10 À : FPC developers' list Objet : [fpc-devel] OpenBsd cross compiler Hi, I usually create Win32 targets using this: make crossinstall OS_TARGET=win32 CPU_TARGET=i386 PP=/home/leonardo/Desarrollo/fpc/i386-linux-ppc386 Now I want to create an OpenBSD cross compiler, so I just replaced win32 by openbsd: Yes, but you do need cross-binutils for openbsd! The problem is that current GNU Binutils source do not generate correct objects/executables for openbsd. Which means that you need to get an openbsd specific binutils source install it, and configure it for the target you are interested in: I checked the internet, and it seems to be difficult to fond. Thus I added it to ftp://ftp.freepascal.org/pub/fpc/contrib/cross/openbsd/ 1) Downloaded ftp://ftp.freepascal.org/pub/fpc/contrib/cross/openbsd/binutils-openbsd-2.15 .tar.gz file. 2) Untar it tar -xvzf binutils-openbsd-2.15.tar.gz 3) Create build directory: mkdir build-cross-i386-openbsd cd build-cross-i386-openbsd 4) Run configure for that target ../binutils-4.9/configure --target=i386-pc-openbsd --program-prefix=i386-openbsd- (That's what I used on mingw32, but to compile on mingw you also need to apply the patch that I added in the same directory on ftp server). 5) Compile and install everything: make all-gas all-binutils all-ld make install-gas install-binutils install-ld prefix=PATH/TO/WHERE/YOU/WANT/IT This should install i386-openbsd-as i386-openbsd-ld and a few more into PATH/TO/WHERE/YOU/WANT/IT/bin directory Note that I didn't use the same procedure on mingw (because I wanted to get binaries that did not depend on any mingw specific DLLs) make crossinstall OS_TARGET=openbsd CPU_TARGET=i386 PP=/home/leonardo/Desarrollo/fpc/i386-linux-ppc386 But the linker is not found. This is the error I get: make[5]: se ingresa al directorio «/home/leonardo/Desarrollo/fpc/rtl/openbsd» /bin/mkdir -p /home/leonardo/Desarrollo/fpc/rtl/units/i386-openbsd i386-openbsd-as -o /home/leonardo/Desarrollo/fpc/rtl/units/i386- openbsd/prt0.o i386/prt0.as make[5]: i386-openbsd-as: No se encontró el programa make[5]: *** [prt0.o] Error 127 make[5]: se sale del directorio «/home/leonardo/Desarrollo/fpc/rtl/openbsd» make[4]: *** [openbsd_all] Error 2 make[4]: se sale del directorio «/home/leonardo/Desarrollo/fpc/rtl» make[3]: *** [rtl] Error 2 make[3]: se sale del directorio «/home/leonardo/Desarrollo/fpc/compiler» make[2]: *** [cycle] Error 2 make[2]: se sale del directorio «/home/leonardo/Desarrollo/fpc/compiler» make[1]: *** [compiler_cycle] Error 2 make[1]: se sale del directorio «/home/leonardo/Desarrollo/fpc» make: *** [build-stamp.i386-openbsd] Error 2 Is there an i386-openbsd-as linker?. Where can I find it. i386-openbsd-as is the assembler, not the linker i386-openbsd-ld is the linker. BTW. I'm on Linux x86_64 (Ubuntu 11.10). You could repeat the steps for x86_64-openbsd target by simply using --target=x86_646pc-openbsd Hoping the above will help, Pierre Hi Pierre, finally I got the time to test this. Sadly, this is the ./configure --target=i386-pc-openbsd -program-prefix=i386-openbsd- output. I'm building this from an x86_64 Linux machine. Here's the output: loading cache ./config.cache checking host system type... x86_64-unknown-linux-gnu checking target system type... i386-pc-openbsd checking build system type... x86_64-unknown-linux-gnu checking for a BSD compatible install... (cached) /usr/bin/install -c checking for x86_64-unknown-linux-gnu-ar... no checking for ar... (cached) ar checking for x86_64-unknown-linux-gnu-as... no checking for as... (cached) as checking for x86_64-unknown-linux-gnu-dlltool... no checking for dlltool... (cached) dlltool checking for x86_64-unknown-linux-gnu-ld... no checking for ld... (cached) ld checking for x86_64-unknown-linux-gnu-nm... no checking for nm... (cached) nm checking for x86_64-unknown-linux-gnu-ranlib... no checking for ranlib... (cached) ranlib checking for x86_64-unknown-linux-gnu-windres... no checking for windres... (cached) windres checking for x86_64-unknown-linux-gnu-objcopy... no checking for objcopy... (cached) objcopy checking for x86_64-unknown-linux-gnu-objdump... no checking for objdump... (cached) objdump checking for i386-pc-openbsd-ar... no checking
Re: [fpc-devel] Problem with nested classes and const struct values
I just encountered this problem again. I can't build my process application and the attached project still won't compile. Can someone shed some light on this problem? Thanks. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Re: Problem with nested classes and const struct values
Ok, Attached is a sample program that demonstrates the problem. FPC 2.6.0 compiles just fine. FPC Trunk has a problem. The attachment of the unit in this thread prior SHOULD work but did not because there is a secondary problem in that once I moved the primary decs into a header file the using unit was able to compile in 2.6 but not 2.7. Adding the contents of hTest to the project's types will make the make FPC 2.6 and 2.7 not compile. I need 2.7 to compile with nested classes. You can fix the secondary problem if you want.. but I absolutely need 2.7 to compile the newly attached project. Thanks Nested.tar.gz Description: GNU Zip compressed data ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel