14 September 2023, 14:52 | #1501 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
I just added the (requested) feature to optimize the shift instructions:
Superfluous signed/unsigned extensions are suppressed and the smallest possible shift is used. Have a look here: https://franke.ms/cex/z/3q19bh. |
14 September 2023, 21:31 | #1502 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Something is not pushed to repository?
with -O2 -fomit-frame-pointer -mregparm -m68020 I get Code:
_lsl_ubb: and.l #255,d0 lsl.l d1,d0 rts _lsl_sbb: lsl.b d1,d0 rts _lsr_ubb: and.l #255,d0 asr.l d1,d0 rts _lsr_sbb: asr.b d1,d0 rts _lsl_usb: and.l #65535,d0 lsl.l d1,d0 rts _lsl_ssb: lsl.w d1,d0 rts _lsr_usb: and.l #65535,d0 asr.l d1,d0 rts _lsr_ssb: asr.w d1,d0 rts If I switch to -O3 I get the correct code for all cpus. So only for 68020 with -O2 there seems to be a glitch. (I've cleaned and rm'd the target directory. All compiled from scratch on pi400) |
15 September 2023, 10:44 | #1503 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
did the same on an odroid and it's ok. gcc version 6.5.0b 230914152536 the result on the pi400 is still better than before :-) |
|
15 September 2023, 11:01 | #1504 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Bebbo something should be done for code short branches to the next instruction
Code:
bne.b 0f 0: |
15 September 2023, 11:48 | #1505 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
example code please Code:
Disassembly of section .text: 00000000 .text: 0: 6600 0000 bne.w 0x2 Last edited by bebbo; 15 September 2023 at 15:53. |
|
17 September 2023, 04:20 | #1506 |
Registered User
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
|
I just stumbled into this shift discussion here, and possibly dancing into a minefield (especially at this hour), wouldn't you rather do
Code:
moveq #$3f,d1 and.b 11(sp),d1 |
17 September 2023, 08:41 | #1507 | ||
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
That AND is implicitly executed by the CPU, no need to add it into the asm code. Quote:
Code:
_lsr_sbb: move.b 7(sp),d1 ext.w d1 ext.l d1 move.b 11(sp),d0 ext.w d0 ext.l d0 asr.l d0,d1 move.l d1,d0 rts Code:
_lsr_sbb: move.b (7,sp),d0 move.b (11,sp),d1 asr.b d1,d0 rts Last edited by bebbo; 17 September 2023 at 08:46. |
||
17 September 2023, 10:28 | #1508 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Code:
main: bra.b 0f 0: rts Code:
SECTION S_0,CODE __stext: DC.W $6000 ;0 __etext: RTS ;2: 4e75 END GNU assembler (GNU Binutils) 2.39.0.230129-131808 Copyright (C) 2022 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `m68k-amigaos'. I also had a problem with add.b #1,a0 generating an illegal instruction without errors but now I can't reproduce it. not using any optimization, and using -m68000 flag. |
17 September 2023, 20:31 | #1509 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
wow, msys2... ... fix is on the way - no idea when msys2 builds successfully again... |
|
17 September 2023, 20:35 | #1510 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Don't look at me, I positively hate MSYS2 and its fake linux compatibility
I always use python to control my toolchains, no damn fake shells that can call .bat files (called by .bat files). Take your time. I'm aware of this issue and I'm using jcc a lot anyway. |
19 September 2023, 22:41 | #1511 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
Oh I found the other bug
Code:
main: subq.b #1,a1 rts disassembly: junk Code:
SECTION S_0,CODE __stext: DC.W $5309 ;0 __etext: RTS ;2: 4e75 END |
21 September 2023, 08:57 | #1512 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
21 September 2023, 14:05 | #1513 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
you rock!
where can it be downloaded? |
21 September 2023, 14:22 | #1514 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
21 September 2023, 16:28 | #1515 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
going to burn this on a CD
|
21 September 2023, 19:45 | #1516 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
|
bingo
bagman.68k:6737: Error: operands mismatch -- statement `subq.b #1,a2' ignored |
24 October 2023, 11:04 | #1517 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
|
I'm trying to build master on macOS Monterey. I'd managed to do this before without issue.
isl@0.18 is disabled in homebrew now, but I managed to get it installed by changing the system date temporarily. Using the script posted in this thread previously: https://gist.github.com/rrs42/5e5b7b...b89d0f4dd3a2a8 with CC=gcc-12 CXX=g++-12 gmake all SHELL=$(brew --prefix)/bin/bash It fails on building gcc with: Code:
... make use of stdint.h in include/isl/stdint.h (assuming C99 compatible system) checking which gmp to use... system checking gmp.h usability... no checking gmp.h presence... no checking for gmp.h... no configure: error: gmp.h header not found gmake[1]: *** [Makefile:4921: configure-isl] Error 1 make gcc...failed isl@0.18 and gmp are linked in brew. gmp.h exists at /usr/local/Cellar/gmp/6.3.0/include/gmp.h I'm guessing theres some issue with isl@0.18 and the installed version of gmp? Any ideas? Also - is the gcc 13 branch gone now? |
24 October 2023, 11:24 | #1518 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
@girv
What version of gmake are you using? Gmake 4.4.1 is known to work. 3.x is known not to work. |
24 October 2023, 11:26 | #1519 |
Mostly Harmless
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
|
$ gmake -v
GNU Make 4.4.1 Built for x86_64-apple-darwin21.6.0 ... |
24 October 2023, 11:32 | #1520 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
Ok. What about Bash?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New GCC based dev toolchain for AmigaOS 3.x | cla | Coders. Releases | 8 | 24 December 2017 10:18 |
Issue with photon/xxxx WinUAE Toolchain | arpz | Coders. Asm / Hardware | 2 | 26 September 2015 22:33 |
New 68k gcc toolchain | arti | Coders. C/C++ | 17 | 31 July 2015 03:59 |
Hannibal's WinUAE Demo Toolchain 5 | Bobic | Amiga scene | 1 | 23 July 2015 21:04 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
|
|