IRC logs for #openrisc Wednesday, 2012-09-12

stekerneven easier since Guiseppe already have started on it07:08
-!- mbuf` is now known as mbuf11:53
stekernhuh, what am I doing wrong when stage1 building of the linux toolchain is trying to link in crt0?11:54
stekernlooking at gcc/config/or1k/or1k.h the only guard seems to be !shared for that11:55
stekernah, it was in libquadmath and libatomic it was failing, those are probably not needed to build a stage1 gcc...12:36
stekernso, tweaking Giueseppes code a bit, got pointer acquiring works12:42
juliusbstekern: can you help me out with getting up to speed with the latest and greatest tool chain we have?13:21
juliusbthe orbuild thing\13:21
juliusbdoes that pull in all of pgavin's work on the tool chain without the delay slot?13:21
juliusbi want to have a tool chain to start developing the "ristretto" mor1kx pipeline, ie. basically espresso but without delay slot13:21
stekernshould pull it in13:25
stekernit should be easy to compile manually as well13:25
stekernyou need or1k-src and or1k-gcc (or llvm-or1k =))13:25
juliusbit'll download it, won't it?13:26
stekernorbuild, I think so13:26
juliusbhmm maye i'll just do it manually13:26
juliusborbuild appears to have fallen over early :(13:27
stekernmy .md-fu is poor :(13:27
stekernI can paste my cheat-sheet13:27
juliusb??13:27 is the gcc machine description thing?13:27
stekernI presume you're mostly interested in or1k-elf?13:28
juliusbno just want to have a tool chain to build binaries which won't have the delay slot instructions13:28
stekernso that's or1k-elf, no?13:28
juliusbumm, could be I guess13:28
stekern(the .md-fu comment was completely out of context ;))13:28
juliusb(ya, it threw me :P)13:29
juliusbummm, yes or1k-elf may be the name of that tool chain, been a while since I played with it13:29
juliusbawesome, where did you get that from?13:32
stekernand some help from pgavin13:32
juliusbso you go, before gcc, before newlib, after gcc, after newlib?13:33
stekernnot sure how necessary the after newlib step is, but doesn't hurt13:33
juliusbexcellent will give it a go13:33
juliusbdoes the tool chain contain a switch to enable/disable the delay slot stuff?13:35
juliusbor this one will certainly be without delay slot?13:35
stekernyeah, -mdelay and -mno-delay13:35
stekernand then there is that -mcompat-delay13:35
stekernif you want no-delay as default you configure with target=or1knd-elf13:35
juliusbok, i recall options such as this from the mailing list discussions but as I never played with it at the time, it's not something which stuck with me13:36
stekernI mostly remember it since I implemented the -m options in clang13:39
juliusbwill give it a go and let you know how I get on :)13:39
stekerngood luck13:41
juliusbreckon I should disable -Werror?13:44
juliusbmy machine's gcc is gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.213:45
juliusbprobably would be better if CGEN added the u suffix to the line in question13:47
juliusbyep, adding u to the values in question fixed the warning13:48
stekernyeah, I remember that, it's an enum that is used as maskfield, right?13:49
juliusbhigh up one13:49
juliusbprobably like 0xc000000013:49
stekernyou only see it on 32-bit13:49
juliusbbut CGEN writes it out as decimal13:49
juliusbahh ok13:49
stekernif you have some permanent fix for it in mind, post it13:50
juliusbwell that file is generated by CGEN, so it'd have to be something there13:50
juliusbso it'd be something along the liens of a CGEN patch which detected values like that which might trip up 32-bit machines and added suffixes13:51
juliusbsorry, bit of a newb question, I do make and then make install after each stage right?13:52
stekernah, yes13:53
juliusbcool, it's a fair thing to assume, but was just double checking13:53
stekernolofk asked the same thing ;)13:54
stekernI'll answer the same thing as I answered to him, as internal notes for my self, I usually remember how to write make && make install =)13:55
stekernhmm wonder how gcc distinguishes between symbolrefs with internal linkage and external...13:59
juliusbyou've got me!14:02
stekernI think I figured it out14:10
stekernlooks like all symbols are accessed through the .got, even ones with local linkage14:11
stekernthat might be wasteful, depending how fast/slow mem-access is14:13
stekernsince then you'll need 1 extra load to get the address out of the .got14:13
stekernotoh, to load the immediate as a constant offset + got pointer you'll ned a movhi, ori, add sequence14:15
stekernapart from that, everything looks pretty good so far, only part missing is emitting function calls through plt14:30
stekernbah, how hard can it be to express "if -fpic have been given on command-line, add a plt() to the l.jal symref so it becomes l.jal plt(symref)"16:29
stekernlack of md-fu cripples me16:29
stekernnice, now it ICE on me... at least my hacks are probably used then...16:54
juliusbOK, I've had an offer from RTE to host the event at their offices. They're happy and will even provide coffee and beer, and just want a bit of a plug17:16
juliusb(where event = OpenRISC Project Meeting)17:17
juliusbbut, in terms of providing a plug, I'm not really sure what we can do17:18
juliusbI mean, put up some thanks on the wiki (I'm sure ORSoC would love that :-/) and mention it in the presentations (I'd like to somehow capture those, audio and/or video17:19
juliusbmaybe standardise the slide set and have their logo on it17:19
juliusbsomewhere in there at least17:20
juliusbstekern: so that tool chain just compiled but it looks like it's not dropping the delay slot stuff17:26
juliusbis non-delay-slot on by default?17:26
juliusbah awesome17:27
juliusbjust had to add -mno-delay17:27 used a whoel heap of different libs!17:27
stekernI've never tested the -mno-delay17:28
juliusbso a helloworld is 0xe58c of .text in delay-slot mode, -mno-delay it's 0xdc9017:29
juliusbstatically, linked of course17:29
juliusbso about 58Kbytes of .text section with delay slot, 56KB without delay slot17:30
juliusbi'm saying your overall code size is smaller without delay slot17:31
juliusbi'm also willing to bet with a small pipeline, you're execution time is quicker too17:31
_franck_how far is the RTE place from Arlanda airport ?17:59
stekernwhere is it?18:06
_franck_Realtime Embedded AB, Realtime Embedded AB, Sveavägen 64, 111 34 Stockholm, Suède18:07
_franck_google map knows it18:07
stekernah ok, so in city18:07
stekernarlanda isn't exactly in the center of sthlm, so anything is about 40km from it18:08
juliusbthe RTE offices are in the center of Stockholm18:13
juliusbyes, Arlanda is ages away, but that's not the question that's interesting18:13
juliusbthe question that is interesting is how far is the RTE offices from decent accommodation and bars with good beer, and luckily the answer is: not far at all :)18:14
_franck_you're right but if I loose 2 hour coming from the airport my stay will be short18:15
_franck_I need to check flight hour with attention :)18:16
juliusbthere's a train which takes 20 minutes from Arlanda to the the center of the city18:21
juliusbThe Arlanda Express18:21
_franck_ok great18:21
juliusbor there's a bus, Flygbussarna18:21
juliusbthat takes about an hour18:21
stekernor taxi, i believe those are about 40 euro18:25
jeremybennettAnyone have a view on hotels in Stockholm. has reasonable rates at Hotell Dialog, Mornington Hotel, Jumbo Stay and Hotel Appelviken18:45
juliusbJumbo Stay is in the 747 out at Arlanda right? You won't want to stay all the way out there!18:55
juliusb(Although it would be cool)18:55
juliusbScandic Norra Bantorget is coming up as well priced and well located18:58
juliusbScandic Anglais, too18:59
jeremybennettWhere are you looking. I can't see them on hotels.com19:00
juliusbThe Dialog hotel is way out, too19:00
juliusbyou can search stockholm and then set it to only show within 2 miles of the city center19:03
juliusbstaying out in the suburbs of stockholm can be annoying because if the metro stops you have to pay fora taxi which will be just as expensive as a night at a closer in hotel :)19:03
juliusbscandic anglais is showing up as 52 quid for 2 nights on kayak19:04
juliusband it's very close to the RTE place and in town19:04
jeremybennettIs that really for 2 nights. Or is it per person per night?19:05
juliusbI thought 2 nights, but let me check19:05
jeremybennettWhen I click on the link the price I'm offered is £23519:06
jeremybennettAh - at the bottom is a cabin room for £116.95. Still more than £52 * 219:07
juliusbmmm, I saw something saying "total" at 59 for it but you're right, when you go to the site they want more than 10019:07
jeremybennettI've not used Kayak before19:07
juliusbthe ability to search by distance is good19:07
juliusbthe map feature is also very good19:07
juliusbHotel Vanadis is on Sveavagen (same street as RTE) isn't too bad19:08
juliusbshared bathroom on the cheapest room, though19:08
juliusbstill not cheap though, they want at least 100 pounds out of you for anything resembling a real hotel for those 2 nights19:11
jeremybennettAnd no window - so basically a cupboard with a bed in it!19:11
juliusbrent in Stockholm was always a killer, hotels, it seems also pass on the cost19:11
jeremybennettYes - I realized that.19:11
jeremybennettThe hotels cost a lot more than the flights!19:11
jeremybennettEven makes Cambridge look reasonable!19:12
jeremybennettWhat do you know about the Metro Hotel?19:13
juliusbAs in the hotel with a website at
juliusbNot too bad, a 15 minute walk from a metro19:18
jeremybennettIt also appears to be known as the Hotel Vastberga19:18
juliusbYes, just to make matters simple!19:18 said it was 2.4 miles from the centre, but Google maps says it is 7.5km19:18
juliusbthat part of Stockholm is a little bit industrial19:19
jeremybennettPresumably why it is cheaper.19:19
juliusbAlthough, I would say Stockholm is a very safe city19:19
juliusbso I wouldn't really worry about safety, just inconvenience19:19
jeremybennettThe other cheap hotels were in Bromma19:19
juliusbBromma isn't too far, actually19:20
juliusbit's generally well connected by busses19:20
jeremybennettMy thought as well.19:20
jeremybennett is an alternative 9km from RTE19:23
juliusbthe real question is how well connected it is via public transport19:35
juliusbput the addresses in there and see what it proposes19:36
jeremybennettYes I had found that19:37
juliusbstekern: you said you've not got much experience with the or1k no-delay-slot compiler right?20:08
juliusbi think I've come across a bug20:09
juliusbwhenc ompiling C files with -mno-delay, the object file says :20:10
juliusbint.o:     file format elf32-or1k20:10
juliusbarchitecture: or1knd, flags 0x00000011:20:10
juliusbHAS_RELOC, HAS_SYMS20:10
juliusbbut a .S file compiled (both with or1k-elf-gcc and -mno-delay somewhere) gives:20:10
juliusbmmu.o:     file format elf32-or1k20:10
juliusbarchitecture: or1k, flags 0x00000010:20:10
juliusbso somehow it's a different architecture, and linknig doesn't work20:10
juliusbsomething for the mailing list I guess20:12
stekernhmm, you're calling as with gcc as shell?20:33
stekernI'm not sure how that works in gcc, but I imagine that should produce the same result as when it assembles the .S gcc produce20:37
juliusbmmm, you have to put a .nodelay in the .S file20:43
juliusbfor it to be recognised as a or1knd architecture20:43
juliusbwell, for it to be labeled as or1knd architecture20:44
juliusbgcc appears to add that into the generated assembly of a C file20:44
juliusbthere must be a more elegant way of getting that into .S files20:46
juliusbthan doing something like20:46
juliusb#ifdef OR1K_NO_DELAY20:46
juliusbhow did it work for the assembly bits of newlib I wonder?20:46
* juliusb inspects...20:46
juliusbnewlib's or1k-asm.h header does this20:47
juliusb#if defined(__OR1K_NODELAY__)20:48
juliusbSo I've been hacking on the ORPSoC/mor1kx-dev-env sw lib20:48
juliusblooks like I'll just include this guy20:48
juliusbso in .S files, best to #include <or1k-asm.h>20:49
juliusband compile with the gcc wrapper program20:49
stekernah, ok21:35
stekernclang doesn't emit those defines21:35
stekern(because I haven't found out how to emit defines when parsing commandline options, if even possible)21:36

Generated by 2.15.2 by Marius Gedminas - find it at!