|
English and QuickBASIC
yes and no
CPallini wrote: You cannot argue with agile people so just take the extreme approach and shoot him.
:Smile:
|
|
|
|
|
|
English and IBM BASIC. God I hated programming in that language, though I think the instructor ("Just use a goto!") had more to do with that than anything. I then learned FORTRAN and the sky became blue and all was right with the world. Now mostly C++, assembly (MIPS), with some C#.
|
|
|
|
|
There's not too many MIPS assembly programmers out there. I wonder how much do you know and how much time do you have? I wonder these things because I have a JIT assembler about to go live as a Code Project article.
It's a reasonable OO design divided between generic base classes and x86 sub classes. Any one really familiar with MIPS assembly and reasonable with C++ could follow the pattern used for x86 and add MIPS support for the low level assembler at least. Let me know if you're interested.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
An OO design? What do the classes do?
I made a JIT assembler for C#, but the design was basically a 2k LOC "Switch of Doom" with some support functions for ModR/M encoding and such.
|
|
|
|
|
You'll have to wait for the article to find out. As with all good OO code the classes do all of it. There's a low level and a high level assembler, full FPU and MMX support up to SSE4.2.
~24 KLOC. It's all based on AsmJit with the coolest part I've added being JIT functors. I just love calling a function that doesn't exist when I call it and have it work
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Are you planning to add AVX2 at some point?
|
|
|
|
|
Clearly that would be after adding AVX but yes it can be added easily enough if I can get hold of the necessary information, register details, opcodes, instructions and any usage rules.
It should be a few days work if it doesn't introduce a new register type, quite a few days if it does. The only problem I can forsee might be the lack of a 128bit numeric type in C++ if as I assume AVX has gone to 128bit SIMD or larger. However that can be worked around.
...
Looking a bit deeper the new wider 256 bit registers won't be an issue because were already handling 128 bits for XMM although the YMM type will take a few days to work through all the cases but the new VEX coding scheme might require some non trivial code changes.
Hmm more to add to the TODO: section of the article and it isn't even submitted yet.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
modified 9-Jul-13 15:07pm.
|
|
|
|
|
Was replying and your latest disappeared so I lost permission to post
Anyway:
Was just looking into the same and modified my previous post. I think the VEX prefix business will cause the most problems. I'm not really the man for the job either as I am no assembly expert and I don't have a Haswell to test it on. If I get a chance I'll suggest AVX support to Petr and see what he reckons or you could sign up to the AsmJit Google group [^] and suggest it yourself.
Are you making use of Haswell/AVX2 for anything or just interested in the bleeding edge?
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
You modified your post so mine became pointless..
Well, I have a Haswell and I'm an assembly expert(I guess?), so maybe I could do something there
I'm using AVX2 in VLC (working on sound format converters), that's just regular pre-assembled assembly though.
|
|
|
|
|
You sound like the right man with the right tools. I'll let you know as soon as the article goes up and hopefully the source will be up on SourceForge by then as well. You're more than welcome to chip in, branch, rewrite in Haskell etc.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
My QOR Architecture Aspect[^] article has gone live. CP editorial did a bang up job with the images in record time
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Scanned it a bit, will read it when I have time (should be soon)
Btw, IIRC you can 5 your own article, did you try that?
|
|
|
|
|
Thanks, I didn't try voting on it myself, I wouldn't want to risk the wrath of Bob.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
By the way, where can I find the code that deals with the "jump target out of range" issue?
|
|
|
|
|
If you mean when short jumps become long jumps that's handled in CEJmp::emit "ArchQOR/x86/HLAssembler/EJmp.cpp:154" in the HLA and you'd have to look after that yourself if you use the low level assembler.
If we're talking jumps larger than 32bits of address space I don't know of any code dealing with that. Petr might be able to enlighten you or it may simply be missing.
I have a couple of 64bit machines and 64bit OSs but I haven't as yet cooked a 64bit build with VS2012 to try out the x64 support. Given that there will be, as noted in the article, serious issues with it. It's on the TODO list but to be honest I've had my fill of assembly language for the moment and am rampaging through the AOP features for the next article. Much more my sort of thing.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Yes that's what I meant. Was just curious how you did it. The simple way apparently, no offense
It's not a very critical thing to get guaranteed minimum branch size, but it's an interesting problem IMO, easy to solve without code alignments (you can assume all branches are short, then make out-of-range ones large until they're all in range), I don't know yet how to do it when alignments get in the way.
|
|
|
|
|
That's exactly the kind of reason I didn't write this thing from scratch. It not nearly as simple an idea as it seems and the scale at which these problems occur is always somewhere between what is 'correct' assembler, i.e. will parse and run, and what is a working program. The size of that gap seems to be bigger in assembly than any other language I've used.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Matthew Faithfull wrote: There's not too many MIPS assembly programmers out there. I learned it in college and while they were teaching it to us they told us, "You will never use this ever again."
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill
America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde
Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
|
|
|
|
|
At least they were honest, my M68000 assembly lecturer swore that we weren't wasting our time
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
German and some ancient version of BASIC on a PDP/11.
Marc
|
|
|
|
|
English (both the Queen's and the POTUS) and Commodore BASIC.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
American English/Apple BASIC.
|
|
|
|
|
English and Pascal.
I use English and C# on a regular basis.
/ravi
|
|
|
|
|
1A) I speak Greek. Problem is, all languages, 'cept American, are "greek" to me.
2A) BASIC
1B) I still speak Greek, with the same caveat as previous noted.
2B) C#
|
|
|
|