Lack of bit field instructions in x86 instruction set because of patents ?

Hello,

I have a question for you:

Can the lack of bit field instructions in the x86 instruction set be explained by patents held by other cpu designers like motorola ?

Or is there another reason why x86 instruction set is missing bit field instructions ?

Bye, Skybuck.

Reply to
Skybuck Flying
Loading thread data ...

The 8008 didn't have them.

The 8080 was designed as an extended 8008. The 8086 was the 8080 extended to 16 bits.

Also, you can do bit operations with AND and OR instructions.

-- glen

Reply to
Glen Herrmannsfeldt

What kind of bit field instruction(s) is lacking?

Reply to
JJ

See motorola processor or nec processor.

InsertBits, ExtractBits, stuff like that ;)

Bye, Skybuck.

Reply to
Skybuck Flying

Yes but only one 8, 16, 32 bits all at once at fixed positions.

To manipulate only a few of those bits requires using masks, shifting, and-ing, not-ing, or-ing, xor-ing etc.

Which can become quite a lot of instructions to do something "relatively simply" like "insert" a few bits into some memory bit location.

(I wouldn't call it insert though... just "move/copy bits into a memory bit location/offset".

A single clock/cycle instruction would be nice.... (or 1 latency in current terms ;))

Bye, Skybuck.

Reply to
Skybuck Flying

HAY! I will have you know that the cows are *NOT* missing bits in the field!

Reply to
Robert Baer

So that means that BT, BTC, BTR and BTS were not sufficient? Your bitfields must be larger?

Reply to
Harold Aptroot

Certainly not, since bit-fields are both obvious and have been implemented in a variety of machines for the past 50 years or so.

They aren't worth it. On the few occasions when you need the facility, a mask and shift takes just two more instructions. (For comparisons or arithmetic on similar bit-fields, you can even omit the shift step.)

Reply to
Ken Hagan

d

it

nt

Rotate through carry may be used to insert and delete single bits. If you need many, then you either loop or use masks and all. SHLD/SHRD may be helpful too, btw.

I think the reason why you don't see such advanced instructions on old or primitive processors is because they're old and primitive. You should feel lucky to have (I)MUL and (I)DIV. :) When I began to program in ASM on Z80 (enhanced i8080) I didn't have this luxury. Also, the CPU ran at only about 3 MHz and instructions took several clocks. So, shifts, adds, LUTs -- all came handy.

Alex

Reply to
Alexei A. Frounze

If it really was the 8080 extended to more bits it would have been a better processor. You would have been able to address 32 bits with two 16 bit registers and not have to wait for a trip through the ALU on every memory operation.

The 8086 also had the "test" instruction to do an AND but not store the results

Reply to
MooseFET

d

Could you please explain why, in your opinion, instructions such as the following 8 bit instructions as well as the respective 16 and 32 bit do not fit the bill?

OR AL,bbbbbbbbB AND AL,bbbbbbbbB XOR AL,bbbbbbbbB TEST AL,bbbbbbbbB

where "b" represents a zero or one bit.

Reply to
lavron

Hi

Z80B, what a large chip, you lucky, lucky man. 6502 or even

formatting link

cheers jacko

Reply to
Jacko

Because the 4004 didn't have them.

x86 is an entirely brain-damaged architecture. It's a good thing that Intel has superb process technology and zero business ethics, otherwise x86 would be a long-forgotten joke.

John

Reply to
John Larkin

In article , snipped-for-privacy@highNOTlandTHIStechnologyPART.com says...>

If IBM hadn't selected the 8088 for the original IBMPC (and then bailed their asses out of a huge financial hole), Intel wouldn't have had time to perfect its zero business ethics.

Reply to
krw

No

Barcelona (AMD) introduced 5 (or was it 7) bit manipulation instructions.

Mitch

Reply to
MitchAlsup

Yeah, tragic mistakes, selecting Intel and Microsoft. It could have been Motorola and DR.

John

Reply to
John Larkin

Wouldn't have been Motorola, but ignoring DR was an oversight.

Reply to
krw

Here is an example of what a motorola processor presumeably does with one instruction:

function KeepLowBits( Value : longword; Bits : longword ) : longword; inline; begin Result := Value; // 32 bits case. if Bits

Reply to
Skybuck Flying

That doesn't stop people from filing patents on bit field instructions.

Maybe intel/amd is scared of law suits ?

This will work up to a certain point... mostly when it's possible to shift-or bits into single memory cell or registers.

As soon as multiple memory cells have to be overwritten things can get quite nasty... especially if bits need to be preserved...

So I don't agree with you.

A simple example where "extract bits" instruction could be usefull is for huffman decompression... where huffman codes can have a number of variable bit fields stuck next to each other.

Extracting those bit fields (huffman codes) requires multiple x86 instructions, which slows down the huffman decoder.

A single instruction to do that would be preferred and would probably/possibly give higher decoding speed and this is just one but an important example ! ;)

Bye, Skybuck =D

Reply to
Skybuck Flying

And the original (A stepping) '386 had Insert Bits and Extract Bits instructions. Apparently Intel needed the microcode space, and pulled them in the B steppings.

Reply to
robertwessel2

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.