Newsgroups: comp.arch Path: csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!enother.net!enother.net!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!kithrup.com!mrs From: mrs@kithrup.com (Mike Stump) Subject: Re: RISC Message-ID: Date: Wed, 9 Dec 2015 18:57:46 GMT References: <818cb73a-9cc4-451e-aa93-a140fc86086f@googlegroups.com> Organization: Kithrup Enterprises, Ld. X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Lines: 40 X-Received-Bytes: 2255 X-Received-Body-CRC: 1433420114 Xref: csiph.com comp.arch:31685 In article , Quadibloc wrote: >On Monday, December 7, 2015 at 12:24:12 AM UTC-7, Ivan Godard wrote: > >> Then they are poorly designed ISAs. All ISAs have some system-control >> ops that are usable only as intrinsics or asm, but unprivileged ops >> should all be reachable from standard languages, or be removed. > >It certainly is true that unprivileged operations that never get used in practice >are... useless. > >But the more common case is that they _are_ reachable, just not in code directly. >Thus, > > CALL SUBRT(A,B,X,Y) > >will indeed generate a store multiple instruction. Speaking of fortran, in gfortran, they have: gfc_define_builtin ("__builtin_clzl", ftype, BUILT_IN_CLZL, "__builtin_clzl", ATTR_CONST_NOTHROW_LEAF_LIST); which appears a gcc normal built-in into fortran. I'd not expect that a user could tell much of a difference between the use in C and the use in fortran. For the ones they want to support, it is a minute of work, and once they do that minute of work, the intrinsic is present. In time, I'd expect them to make the list of intrinsics available to just be all the gcc C ones, unless there is a reason why it should not be or cannot be supported. I didn't see a good reason why they didn't do that already, seems like less work to me. >But you won't be able to directly write FORTRAN code that uses them in-line, the way that > > I = J + K > >will generate code that uses an add instruction in-line. Unless there is a gcc intrinsic for it, and one is using gfortran and someone takes a minute to add it.