Stupid x86/ x86-64

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Stupid x86/ x86-64

Post by Troy Martin »

Combuster wrote:Even better: Hitachi SH-4 with Windows CE (dreamcast, anyone?).
Didn't the Dreamcast WinCE have only the core Windows stuff and DirectX, no GUI?
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
steveklabnik
Member
Member
Posts: 72
Joined: Wed Jan 28, 2009 4:30 pm

Re: Stupid x86/ x86-64

Post by steveklabnik »

Troy Martin wrote:I've started writing an open-source 16-bit processor in C that could very easily be made 32-bit or higher. I'm planning on releasing it as soon as I finish the CSR system (Call Service Routine) and a simple assembler.

A processor? In C? Do you mean a VM, too? Or are you writing a processor simulator?
User avatar
stephenj
Member
Member
Posts: 140
Joined: Wed Jul 23, 2008 1:37 am
Location: Canada

Re: Stupid x86/ x86-64

Post by stephenj »

steveklabnik wrote:
Troy Martin wrote:I've started writing an open-source 16-bit processor in C that could very easily be made 32-bit or higher. I'm planning on releasing it as soon as I finish the CSR system (Call Service Routine) and a simple assembler.

A processor? In C? Do you mean a VM, too? Or are you writing a processor simulator?
AT&T's Hobbit is how I interpreted it on the first pass.
User avatar
steveklabnik
Member
Member
Posts: 72
Joined: Wed Jan 28, 2009 4:30 pm

Re: Stupid x86/ x86-64

Post by steveklabnik »

Interesting... a C machine... I guess this makes sense. I'd heard about the good 'ol Lisp machines, I guess there's no reason why there couldn't be a C one...
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Re: Stupid x86/ x86-64

Post by Colonel Kernel »

PowerPC rocks! Where else can you find instructions like stfsux and eieio? :D
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Stupid x86/ x86-64

Post by Combuster »

Colonel Kernel wrote:PowerPC rocks! Where else can you find instructions like stfsux and eieio? :D
ROFL :lol:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Stupid x86/ x86-64

Post by JamesM »

[/quote]I just wish intel or amd would start making RISC desktops(processors that is).[/quote]

x86 is pretty much RISC once you get past the microcode stage. That's why their pipeline is so long.

And yes, enforce in-order execution of i/o is my favourite instruction. Blatantly designed around the acronym, similar to the Continuous Unnecessary Notification Test that was invented at my place of work last year. (No, that is not made up.).
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Stupid x86/ x86-64

Post by Troy Martin »

Actually what I meant was I'm writing a processor emulator in C for a processor I designed.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
madeofstaples
Member
Member
Posts: 204
Joined: Thu Apr 12, 2007 8:15 am
Location: Michigan

Re: Stupid x86/ x86-64

Post by madeofstaples »

Troy Martin wrote:Actually what I meant was I'm writing a processor emulator in C for a processor I designed.
Did you design a processor (you'd probably have done this in an HDL), or an ISA (you've come up with opcodes and planned out how the opcodes and the necessary operands will be encoded into appropriately-sized words, etc)?
Some people are offended by the verifiable truth; such people tend to remain blissfully unencumbered by fact.
If you are one of these people, my posts may cause considerable discomfort. Read at your own risk.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Stupid x86/ x86-64

Post by AndrewAPrice »

Colonel Kernel wrote:eieio
Until I looked up what EIEIO did (Enforce In-Order Execution of I/O) I thought it might have started playing Old MacDonald Had A Farm EIEIO!
My OS is Perception.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Stupid x86/ x86-64

Post by Troy Martin »

madeofstaples wrote:
Troy Martin wrote:Actually what I meant was I'm writing a processor emulator in C for a processor I designed.
Did you design a processor (you'd probably have done this in an HDL), or an ISA (you've come up with opcodes and planned out how the opcodes and the necessary operands will be encoded into appropriately-sized words, etc)?
ISA.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Stupid x86/ x86-64

Post by earlz »

I'm still waiting for asynchronous CPUs to become popular... the days where things aren't measured in dumb clock cycles and just cause div takes a long clock cycle to complete, doesn't mean a nop should have the same long clock cycle. (plus power saving would be awesome)
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Stupid x86/ x86-64

Post by JohnnyTheDon »

Don't Intels (and probably AMDs) processors already do this? I remember reading somewhere that add is 3 clocks and div is 7 clocks or something like that.
User avatar
Wilkie
Member
Member
Posts: 44
Joined: Tue Aug 26, 2008 10:02 pm
Location: Land of the Dead
Contact:

Re: Stupid x86/ x86-64

Post by Wilkie »

Perhaps I have also misunderstood you, earlz. If a nop and a div take the same amount of time, wouldn't that be a single-cycle machine? The x86 has been pipelined for years now (one of the reasons why the underlying design is a RISC), so it shouldn't suffer from that. Forgoing branch prediction and other worst-case situations, the throughput should be much better than any 1 single instruction's time.
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: Stupid x86/ x86-64

Post by JAAman »

actually, even on the 8088, different instructions took different numbers of cycles

current CPUs not only use multiple cycles per instruction, but also allow instructions to take less than a cycle (for example, on northwood and later, each ALU can perform add and subtract instructions in half a cycle, meaning each one can perform 2 per cycle, with northwood, one of them could do the same with multiplication (but the others take longer) but beginning with prescott all ALUs can perform multiplication in a single half-cycle

several years ago, the number of cycles an instruction takes got to be so well hidden behind unpredictable timing issues, that intel declared it to be completely useless information, and stopped printing charts with this information
Post Reply