Show Idle (>14 d.) Chans


← 2025-09-28 | 2025-10-01 →
13:38 jonsykkel re ch13:
13:38 jonsykkel 1. did u consider this kinda algo http://zzz.st/up/wVl3rn2q/ (no idea how to do the weird ada aray indexing)
13:38 jonsykkel 2. FZ_ShiftRight_O_I with count=0 relys on Shift_Left(x, bitness) shifting all bits out of existence, which raises folowing sub-questions:
13:38 jonsykkel 2a. dose ada standard guarante this? im couldnt find anything about it in pdf
13:38 jonsykkel 2b. x86 masks the shift count so "shl rax, 64" dosnt do anything, so it must compile to som sort of conditional or weird thing. i chekd asebly output from my gnat, it semed to produce not a jump but cmp 0x40 then cmov
13:38 jonsykkel 3. new w_borow function sems to result in somwat slower code, using all compilers i had lying around. duno how to explain that but intresting. the mod exp from ch7 http://zzz.st/up/bcOOg3it/
~ 20 minutes ~
13:59 jonsykkel i supose my algo creates difrent memory aces patern based on sekrit shift count
~ 50 minutes ~
14:49 asciilifeform jonsykkel: aaaha
14:49 asciilifeform not so 'quiet', is it, then.
14:50 jonsykkel yes i undersand now
14:50 jonsykkel CONSTANT-SPACETIME
14:50 asciilifeform right
14:52 asciilifeform re w_borrow & shift -- these arguably belong asm'ified (as later bvt did) in practice
14:54 asciilifeform the ada version is 'canonical' tho, and if jonsykkel (or anyone else) finds bug (incl. branches/accesses on seekrit bitz) in it, asciilifeform would much like to hear about it
14:54 asciilifeform speedups of const factor in the ada not nearly so much of a concern tho
14:55 asciilifeform (speed-sensitive applications oughta use asmified word arithmetic & carries)
15:00 jonsykkel naturaly. question 2b re shift was about constanttimeness of generated code tho
15:07 asciilifeform jonsykkel: would concern the variant where HaveBarrelShifter enabled. empirically did not detect (with random inputs) any correlation, but perhaps worth measuring moar precisely (if yer right re cmov)
15:08 * asciilifeform suspects that cmov does not give cycle count variance on x86/64, but may give variance in amperage, depending on whether a write occurs, whether cache invalidated, etc
15:10 asciilifeform would be interesting to search for other verboten conditionals in the compiled bins
15:10 asciilifeform (perhaps there's a clever automated tool for this? if not, oughta be)
15:11 * asciilifeform was in fact planning to audit bins before production use, but 'war ended' befoar this could happen
15:11 jonsykkel suspects that cmov does not give cycle count variance on x86/64 << wouldnt think so either, was thinking more about posibility of some compilers generating a jump
15:12 asciilifeform jonsykkel: even w/out a jump, potentially leaks info, see above
15:12 * asciilifeform not recalls whether cmov invalidates cache when not-taken
15:12 jonsykkel posible
15:14 asciilifeform see here re shifter tests.
← 2025-09-28 | 2025-10-01 →