Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: AES problem (was: Good hash for pointers) Date: Wed, 05 Jun 2024 21:24:40 -0700 Organization: A noiseless patient Spider Lines: 32 Message-ID: <865xumn1fb.fsf@linuxsc.com> References: <86fru6gsqr.fsf@linuxsc.com> <8634q5hjsp.fsf@linuxsc.com> <86le3wfsmd.fsf@linuxsc.com> <86ed9ofq14.fsf@linuxsc.com> <20240605005916.00001b33@yahoo.com> <86a5jzmle1.fsf@linuxsc.com> <20240605195159.00002f0e@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Thu, 06 Jun 2024 06:24:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d27732bb70530c4a14d68e0b12f92cb8"; logging-data="1440310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18M+unpka1wgGbwBw5jvttGd1LyTEMNF2s=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:HSJeyUxV8WIADhn3jX4UQxAigxo= sha1:vptabeSkyceI/ujijy9YrvJGPLU= Bytes: 2670 Michael S writes: > On Wed, 05 Jun 2024 08:58:46 -0700 > Tim Rentsch wrote: > >> Michael S writes: >> >> >> I couldn't get the AES-based hash function to compile. There >> was a complaint about not being able to inline an 'always-inline' >> function. I played around with it for a while but didn't get >> anywhere. > > Not that using my reference hash is particularly important (I needed it > as a quick way to get something I could rely on; you already have > something else with similar properties) but it's still worth > investigation. > > There are two possibilities: > 1. gcc compiler's -march=native logic incorrectly detects CPU type on > your computer. > 2. you CPU really does not support AES instructions. > > If the former, you can force compiler's hand with -maes flag. > If the later, then you can compile it, but wouldn't be able to run my > "reference" hash function on this particular computer I finally got it to work. I tried -maes before, and it still failed, but maybe I was using some other option that messed things up. In any case it works now, and the AES hash gives great results AFAICT.