search for: mulw

Displaying 20 results from an estimated 20 matches for "mulw".

Did you mean: mul
2007 Nov 21
3
[LLVMdev] Add/sub with carry; widening multiply
I've been playing around with llvm lately and I was wondering something about the bitcode instructions for basic arithmetic. Is there any plan to provide instructions that perform widening multiply, or add with carry? It might be written as: mulw i32 %lhs %rhs -> i64 ; widening multiply addw i32 %lhs %rhs -> i33 ; widening add addc i32 %lhs, i32 %rhs, i1 %c -> i33 ; add with carry Alternatively, would something like following get reduced to a single multiply and two stores on arch's that support wide multiplies, like x86-32 an...
2017 Mar 22
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...CHS values or just do some dummy computation for EBIOS */ andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ pushw %ax /* -18: Save heads on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ Does "-16: Save sectors on the stack" contradict "sectors = (stack-18)" ? Have a nice day :) Thomas
2012 Aug 10
1
[PATCH 4/4] Support sectors >512
...EBIOS */ andw $0x3f, %cx /* Sector count */ - movw %sp, %bp /* %bp -> frame pointer: LEAVE UNCHANGED */ - pushw %cx /* -2(%bp) Save sectors on the stack */ + pushw %cx /* -32(%bp) Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ mulw %cx /* Heads*sectors -> sectors per cylinder */ /* Save sectors/cylinder on the stack */ - pushw %dx /* -4(%bp) High word */ - pushw %ax /* -6(%bp) Low word */ + pushw %dx /* -34(%bp) High word */ + pushw %ax /* -36(%bp) Low word */ /* Load partition table header */ xorl %eax,%eax...
2013 Feb 08
6
[PATCH] 4k_sector: Support dynamic sectors in GPT MBR
This patches add support for dynamic sectors to GPT MBR code. First 3 patches are trick and optimizations to gain some space for the forth patch. I have a modified version of SeaBIOS, some code and some script o test it I'll send on a different mail.
2018 Dec 13
2
Dealing with information loss for widened integer operations at ISel time
As previously discussed in an RFC <http://lists.llvm.org/pipermail/llvm-dev/2018-October/126690.html>, the RISC-V backend has i64 as the only legal integer type for the RV64 target. Thanks to variable-sized register class support, this means there is no need for duplication of either patterns or instruction definitions for RV32 and RV64. It's worth noting that RV64I is a different base
2017 Mar 24
2
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...ctim of the most recent not yet popped PUSH, then this does not look correctly coordinated with the MBR. isohdpfx.S has: pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ pushw %ax /* -18: Save heads on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ pushw %bx /* -20: EBIOS flag */ isolinux.asm has: ; The following values will have been pushed onto the ; entry stack: ; - partition offset (qword) ; - ES ; - DI ; - DX (including drive number) ; - CBIOS Heads ; - CBIOS Secto...
2018 Dec 14
2
Dealing with information loss for widened integer operations at ISel time
...not. > > Could you describe more specifically where this matters? I would guess > the W-suffixed instructions aren't actually any cheaper, in general, > than non-W-suffixed instructions, so there's no point to using W forms > if you don't need the sign extension. Unless MULW has lower latency than > MUL on some CPU? It only matters when it allows you to avoid an unnecessary sext/zext of the input operands. Consider the following input: define i32 @aext_divuw_aext_aext(i32 %a, i32 %b) nounwind { %1 = udiv i32 %a, %b ret i32 %1 } This pattern won't match: d...
2017 Mar 22
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...omputation for EBIOS */ > andw $0x3f, %cx /* Sector count */ > popw %bx /* EBIOS flag */ > pushw %cx /* -16: Save sectors on the stack */ > movzbw %dh, %ax /* dh = max head */ > incw %ax /* From 0-based max to count */ > pushw %ax /* -18: Save heads on the stack */ > mulw %cx /* Heads*sectors -> sectors per cylinder */ > > Does "-16: Save sectors on the stack" contradict "sectors = (stack-18)" ? Yes. Congratulations Thomas, you've found the bug! Very well done. Thank you. Changing the code to sectors = (stack-16) heads...
2017 Mar 25
0
where to swap
...ck */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -18: Save heads on the stack */ + pushw %ax /* -16: Save heads on the stack */ + andw $0x3f, %cx /* Sector count */ + pushw %cx /* -18: Save sectors on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ pushw %bx /* -20: EBIOS flag */ Given David's last report the part: - jmp 1f + jmp 2f 1: + xor %cx, %cx /* Clear EBIOS flag. */ +2: can be ignored. His BIOS isn't corrputing CX (which I thou...
2017 Apr 16
1
fwd: [syslinux:syslinux-4.xx] mbr/isohdpfx.S: correct stack for heads/sectors
...16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -18: Save heads on the stack */ + pushw %ax /* -16: Save heads on the stack */ + andw $0x3f, %cx /* Sector count */ + pushw %cx /* -18: Save sectors on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ pushw %bx /* -20: EBIOS flag */ _______________________________________________ Syslinux-commits mailing list Syslinux-commits at zytor.com http://www.zytor.com/mailman/listinfo/syslinux-commits ----- End forwarded message ----- -- Groeten...
2017 Mar 24
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ - pushw %ax /* -18: Save heads on the stack */ + pushw %ax /* -16: Save heads on the stack */ + andw $0x3f, %cx /* Sector count */ + pushw %cx /* -18: Save sectors on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ pushw %bx /* -20: EBIOS flag */ I suppose you'd want a .bin as well: <http://www.ludd.ltu.se/~ams/tmp/isohdpfx.bin.170324> -- MartinS
2017 Mar 25
2
where to swap
It is good to see this ----- Forwarded message from syslinux-bot for Martin Str|mberg <ams at ludd.ltu.se> ----- Date: Sat, 25 Mar 2017 05:54:09 -0700 From: syslinux-bot for Martin Str|mberg <ams at ludd.ltu.se> To: Syslinux commits mailing list <syslinux-commits at zytor.com> Cc: ams at ludd.ltu.se Subject: [syslinux:master] mbr/isohdpfx.S: correct pointer for heads/sectors
2017 Mar 26
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...to count */ > - pushw %ax /* -18: Save heads on the stack */ > + pushw %ax /* -16: Save heads on the stack */ > + andw $0x3f, %cx /* Sector count */ > + pushw %cx /* -18: Save sectors on the stack */ > mulw %cx /* Heads*sectors -> sectors per cylinder */ > > pushw %bx /* -20: EBIOS flag */ Martin/Thomas: Thank you for your troubleshooting efforts. Looks like I jumped a little too soon. I started doing git blame on core/isolinux.asm and mbr/isohdpfx.S an...
2017 Mar 22
4
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, funny or enlightening observation: With my qemu-system-i386 it would work if the detected Heads/Cylinder and Sectors/Head factors would change positions ! The effective read operation seems to use H/C = 32 , S/H = 63. The correct LBA would be addressed by H/C = 63 , S/H = 32. -------------------------------------------------------------------------- Reasoning: I have transplanted the
2017 Mar 24
2
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, C/H/S addressing and reading of first block seems to be ok in isohdpfd.bin. The main suspect for the failure of the attempt with isohdpfd.bin is the number or content of the blocks read after the first one. But i have no clue why isohdpfc.bin should do better than isohdpfd.bin. They differ just by one instruction (JC = 0x72 versus JMP = 0xEB) which both are performed before the reading and
2009 Mar 30
2
[PATCH 1/1] v2 Add Diagnostic MBR for trouble-shooting
...um to quantity */ + movzbw %dh, %ax /* DH = maximum head number */ + pushw %ax /* preserve maximum head number */ + andw $0x3f, %cx /* mask to enforce maximum sector number 63 */ + pushw %cx /* preserve sector count */ + incw %ax /* convert zero-based maximum head number to quantity */ + mulw %cx /* sectors per cylinder = heads*sectors */ + pushw %dx /* preserve sectors per cylinder DX:AX */ + pushw %ax + +msg_format_cylinders: + movw $msg_cylinders, %di + movw (cylinders), %dx + movb $0x03, %cl /* write three nibbles */ + call write_hex_value + +msg_format_heads: + movw $msg_he...
2017 Mar 21
3
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...CHS values or just do some dummy computation for EBIOS */ andw $0x3f, %cx /* Sector count */ popw %bx /* EBIOS flag */ pushw %cx /* -16: Save sectors on the stack */ movzbw %dh, %ax /* dh = max head */ incw %ax /* From 0-based max to count */ pushw %ax /* -18: Save heads on the stack */ mulw %cx /* Heads*sectors -> sectors per cylinder */ pushw %bx /* -20: EBIOS flag */ /* Save sectors/cylinder on the stack */ pushw %dx /* -22: High word */ pushw %ax /* -24: Low word */ /* * Load sectors. We do this one at a time mostly to avoid * pitfalls and to share code with th...
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2009 Mar 30
0
[PATCH 1/1] Add Diagnostic MBR for trouble-shooting
...-based maximum to quantity */ + movzbw %dh, %ax /* DH = maximum head number */ + pushw %ax /* preserve maximum head number */ + andw $0x3f, %cx /* mask to enforce maximum sector number 63 */ + pushw %cx /* preserve sector count */ + incw %ax /* convert zero-based maximum to quantity */ + mulw %cx /* sectors per cylinder = heads*sectors */ + pushw %dx /* preserve sectors per cylinder */ + pushw %ax + +msg_format_cylinders: + movw $msg_cylinders, %di + movw (cylinders), %dx + movb $0x03, %cl /* write three nibbles */ + call write_hex_value + +msg_format_heads: + movw $msg_heads, %...
2009 Mar 30
2
[PATCH 1/1] v3: Add Diagnostic MBR for trouble-shooting BIOS boot-order problems.
...um to quantity */ + movzbw %dh, %ax /* DH = maximum head number */ + pushw %ax /* preserve maximum head number */ + andw $0x3f, %cx /* mask to enforce maximum sector number 63 */ + pushw %cx /* preserve sector count */ + incw %ax /* convert zero-based maximum head number to quantity */ + mulw %cx /* sectors per cylinder = heads*sectors */ + pushw %dx /* preserve sectors per cylinder DX:AX */ + pushw %ax + +msg_format_cylinders: + movw $msg_cylinders, %di + movw (cylinders), %dx + movb $0x03, %cl /* write three nibbles */ + call write_hex_value + +msg_format_heads: + movw $msg_he...