Newsgroups: comp.arch Path: csiph.com!xmission!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!kithrup.com!mrs From: mrs@kithrup.com (Mike Stump) Subject: Re: RISC Message-ID: Date: Tue, 8 Dec 2015 23:33:45 GMT References: <58c12752-2066-4014-8f83-808e5c4dfd6d@googlegroups.com> <56655dcb$0$92895$742ec2ed@news.sonic.net> Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 34 Xref: csiph.com comp.arch:31659 In article <56655dcb$0$92895$742ec2ed@news.sonic.net>, Rob Warnock wrote: >"Fuzzy" indeed, since AFAIK many "crypto acceleration" ops are >mostly-normal arithmetic instructions that just happen to do things >that most programming languages don't consider as primitive ops I don't have any clue what primative ops means. What I do know is that compiler and the language front end can support instructions and reason about them, without limitation, other than interest in doing the work. Compilers are free to reason about 32 bit adds, or AES encrypts, or not, as their users would like. A good compiler, will. >Of course, to add to the "fuzziness" issue, it doesn't say >anything about what "support" means!! ;-} ;-} :-) It means that the user who wants to write code that will generate that instruction, can. For example, Intel defines an api that looks like C functions, that when called, won't actually call any routine with the call instruction, rather, in place of call, the desired instruction will appear. The apis have a tendancy to produce exactly one assembly instruction. Think of it as machine coding from a C api. Better libraries can be written to have nicer or different apis that build upon the primatives, limited only by ht imagination of the library creator. >Anyway, the point is that such instructions are *not* >"on-board I/O devices" that have to be "acquired" or >locked by a process to use them. They're just normal >[albeit weird] CPU [or SSE] instructions. Actually, some of the instructions very much can be thought of this way. I have access to a dma engine with such an instruction on my CPU, and I have access to a network engine as well. These two beasts can reaonably be thought of as on chip IO devices. The optimizer can even reason about them the way I plug them in.