English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 27 January 2020, 13:41   #1
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,038
Question VBCC ARM backend possible?

Hi,

What exactly would be needed to make VBCC process C code in a way so vasm in turn can output ARM assembly code?

In other words, what is needed to make an ARM backend for VBCC?
Hedeon is offline  
Old 27 January 2020, 14:31   #2
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
Quote:
Originally Posted by Hedeon View Post
Hi,

What exactly would be needed to make VBCC process C code in a way so vasm in turn can output ARM assembly code?

In other words, what is needed to make an ARM backend for VBCC?
You'll need a vbcc backend that emits ARM assembly, which vasm will in turn assemble into object code.

VBCC has a really neat backend interface, and it's well documented too - see http://www.ibaug.de/vbcc/doc/vbcc_13.html

If you're interested in creating a new backend, start by reading the generic RISC backend, understand what it's doing, then probably the best path is to copy it and adapt it gradually to the target instruction set.

It'd be worth checking with phx and Volker Barthelmann first, though, to make sure no-one's already working on such a thing.
robinsonb5 is offline  
Old 27 January 2020, 21:25   #3
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,038
Thanks. Seeing the emerging use of ARM coprocessors in some cards already on the market (zz9000) and upcoming cards (warp) it might be something worthwhile to look at.
Hedeon is offline  
Old 08 November 2020, 21:02   #4
polluks
Registered User
 
Join Date: Nov 2020
Location: Germany
Posts: 4
Already possible
> type t:a.c
main()
{
return 42;
}
> bin/vbccarm t:a.c
vbcc V0.9h pre (c) in 1995-2020 by Volker Barthelmann
vbcc code-generator for ARM V0.0 (c) in 2006 by Frank Wille
> type t:a.asm
.file "t:a.c"
.text
.global _main
_main:
mov r0,#42
l1:
mov pc,lr
.type _main,@function
.size _main,.-_main
polluks is offline  
Old 07 January 2021, 00:40   #5
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,038
I missed this post. Are those binaries on the vbcc site?
Hedeon is offline  
Old 07 January 2021, 09:56   #6
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
Quote:
Originally Posted by Hedeon View Post
I missed this post. Are those binaries on the vbcc site?

The experimental ARM code is in the source snapshot on Volker Barthelmann's site: http://www.compilers.de/vbcc.html - but I believe it was only preliminary, it's not yet in a useful state. I asked him about it a few weeks ago and he said that because ARM is so well supported elsewhere it's not a very interesting target for VBCC, which makes sense.
robinsonb5 is offline  
Old 07 January 2021, 16:02   #7
Hedeon
Semi-Retired
 
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,038
Ah, bummer. I like to develop on Amiga itself. Call me masochistic. But it's a reason to turn the machine on :-)
Hedeon is offline  
Old 07 January 2021, 17:02   #8
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
Oh, the year is 2006. This must have been the time after I finished my first ARM backend for vasm. I thought I might try a vbcc-backend for ARM as well ... but failed (it was my first and only attempt for a vbcc-backend).

This doesn't mean it is difficult. RISC-backends are usually on the easier side. Somebody with the experience of robinson5, who already wrote a working vbcc-backend, could certainly do it. Or try it yourself, and we would help you!
phx is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBCC and ARM Hedeon Coders. C/C++ 2 30 December 2019 00:59
Amiga on ARM chanunnaki Amiga scene 14 09 April 2019 15:08
UAE4ARM, actually for ARM? Enverex support.OtherUAE 3 08 June 2016 11:58
IPF and ARM ascp project.SPS (was CAPS) 24 14 October 2015 19:19
slirp network emulation backend Toni Wilen support.WinUAE 27 28 February 2014 13:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:37.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07945 seconds with 13 queries