Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
15 crawler(s) on-line.
 125 guest(s) on-line.
 1 member(s) on-line.


 OldFart

You are an anonymous user.
Register Now!
 OldFart:  1 min ago
 pavlor:  5 mins ago
 zipper:  22 mins ago
 VooDoo:  38 mins ago
 matthey:  44 mins ago
 kolla:  1 hr 57 mins ago
 michalsc:  2 hrs 7 mins ago
 amigang:  2 hrs 16 mins ago
 gryfon:  2 hrs 32 mins ago
 Rob:  3 hrs 11 mins ago

/  Forum Index
   /  Amiga General Chat
      /  Amiga Inc. Loses U.S. Trademarks
Register To Post

PosterThread
michalsc 
Re: Cloanto acquire Amiga Inc Trademark
Posted on 21-Apr-2021 9:52:24
#1 ]
AROS Core Developer
Joined: 14-Jun-2005
Posts: 377
From: Germany

@ppcamiga1

Quote:
This is hand made assembler code not what produce gcc for example on rpi.


Are you trying to be smart? Have you ever worked with aarch32/aarch64? Have you ever programmed them? HAve you ever used/programmed ARM in big endian mode? Have you ever read ARM manuals? Hand made assembler? Hmm, here you go:

Quote:

➜ ~ cat foo.c

unsigned int foo()
{
return 0xdeadbeef;
}

➜ ~ /opt/cross/bin/aarch64-linux-gcc -Os -S -mbig-endian foo.c
➜ ~ cat foo.s
.arch armv8-a
.file "foo.c"
.text
.align 2
.global foo
.type foo, %function
foo:
.LFB0:
.cfi_startproc
mov w0, 48879
movk w0, 0xdead, lsl 16
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.ident "GCC: (GNU) 8.2.0"
.section .note.GNU-stack,"",@progbits
➜ ~ /opt/cross/bin/aarch64-linux-gcc -Os -c -mbig-endian foo.c
➜ ~ /opt/cross/bin/aarch64-linux-objdump -S foo.o

foo.o: file format elf64-bigaarch64


Disassembly of section .text:

0000000000000000 :
0: 5297dde0 mov w0, #0xbeef // #48879
4: 72bbd5a0 movk w0, #0xdead, lsl #16
8: d65f03c0 ret


Do you prefer 32-bit arm? Here you go, this time with dump of binary files:

Quote:

➜ ~ /opt/cross/bin/arm-linux-gnueabihf-gcc -nostartfiles -nostdlib -Os -o foo foo.c
/opt/cross/lib/gcc/arm-linux-gnueabihf/8.2.0/../../../../arm-linux-gnueabihf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000010074
➜ ~ /opt/cross/bin/arm-linux-gnueabihf-objcopy -O binary foo foo.bin
➜ ~ hexdump -C foo.bin
00000000 00 00 9f e5 1e ff 2f e1 ef be ad de |....../.....|
0000000c
➜ ~ /opt/cross/bin/arm-linux-gnueabihf-gcc -mbe8 -mbig-endian -Wl,--be8 -Wl,--format=elf32-bigarm -nostartfiles -nostdlib -Os -o foo foo.c
/opt/cross/lib/gcc/arm-linux-gnueabihf/8.2.0/../../../../arm-linux-gnueabihf/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000010074
➜ ~ /opt/cross/bin/arm-linux-gnueabihf-objcopy -O binary foo foo.bin
➜ ~ hexdump -C foo.bin
00000000 00 00 9f e5 1e ff 2f e1 de ad be ef |....../.....|
0000000c


There you can clearly see that loading constant from the code section does not change instruction stream (first 8 bytes), but definitely changes the last 4 bytes from little endian byte order to big endian byte order. From programmer point of view the CPU behaves in this case as any regular big-endian cpu. Even if byte order of CPU instructions remained LE.

Quote:

Old C/C++ Amiga code should work after just recompilation.
It works on ppc because on ppc like m68k data AND code are 32 bit big endian.


This is exactly the case. If AmigaOS was using 32bit ARM cpu operated in big endian mode, re-using old C/C++ Amiga code would be just a matter of recompilation.

Quote:
It is not possible on ARM because on ARM code is little endian.


Again. It does not matter what byte order the instruction stream is using. And, yet again, feel free to prove me wrong with something more than words.

Last edited by michalsc on 21-Apr-2021 at 10:04 AM.
Last edited by michalsc on 21-Apr-2021 at 10:02 AM.

 Status: Offline
Profile     Report this post  
 Top | Parent

Replies
SubjectPosterDate
      Re: Cloanto acquire Amiga Inc Trademarkppcamiga122-Apr-2021 9:40:39
          Re: Cloanto acquire Amiga Inc Trademarkmichalsc22-Apr-2021 10:01:47
              Re: Cloanto acquire Amiga Inc Trademarkppcamiga122-Apr-2021 17:12:52
                  Re: Cloanto acquire Amiga Inc Trademarkmichalsc22-Apr-2021 17:50:56
                  Re: Cloanto acquire Amiga Inc TrademarkCheese22-Apr-2021 22:23:36



[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle