Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

uses of break , cop , nop

11 views
Skip to first unread message

Joe Boctor

unread,
Feb 14, 2001, 10:17:24 PM2/14/01
to

Hi!

What are the commons uses of break, cop, nop instructions on many of the
current processors?

thnx for any input,
Joe

Alexei A. Frounze

unread,
Feb 15, 2001, 12:49:05 AM2/15/01
to
"Joe Boctor" <jmbo...@rees.math.uwaterloo.ca> wrote in message
news:2001021503...@odin.asgard...

>
> Hi!
>
> What are the commons uses of break, cop, nop instructions on many of the
> current processors?

what are break and cop?

seems x86 doesn't have a nop.
db 90h is xhchg ax, ax or something which doesn't do anything. :)

I think nop is not a big deal. more importand might be halt - e.g. just wait
for an IRQ which probably can save some energy if HLT somehow helps CPU to
change power consumption mode.

Good Luck
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/


Barry Kelly

unread,
Feb 21, 2001, 7:52:32 PM2/21/01
to

"Joe Boctor" <jmbo...@rees.math.uwaterloo.ca> wrote in message
news:2001021503...@odin.asgard...
>
> Hi!
>
> What are the commons uses of break, cop, nop instructions on many of the
> current processors?

No idea about break and cop, but nop is quite important for compiler
writers. It helps to align code, and to allow a peephole optimizer to run on
code. The peephole optimizer can replace long instruction sequences with
shorter ones, and fill the gaps with nops. This means the code is still
executable, and a later stage which runs through the code to compact and
remove the nops can be developed separately.

0 new messages