Changeset 28a5ebd in mainline for kernel/arch/ia32/src/asm.S


Ignore:
Timestamp:
2020-06-18T15:39:50Z (4 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ce52c333
Parents:
4f663f3e
Message:

Use char32_t instead of wchat_t to represent UTF-32 strings

The intention of the native HelenOS string API has been always to
support Unicode in the UTF-8 and UTF-32 encodings as the sole character
representations and ignore the obsolete mess of older single-byte and
multibyte character encodings. Before C11, the wchar_t type has been
slightly misused for the purpose of the UTF-32 strings. The newer
char32_t type is obviously a much more suitable option. The standard
defines char32_t as uint_least32_t, thus we can take the liberty to fix
it to uint32_t.

To maintain compatilibity with the C Standard, the putwchar(wchar_t)
functions has been replaced by our custom putuchar(char32_t) functions
where appropriate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/asm.S

    r4f663f3e r28a5ebd  
    451451 *
    452452 */
    453 FUNCTION_BEGIN(early_putwchar)
     453FUNCTION_BEGIN(early_putuchar)
    454454
    455455#if ((defined(CONFIG_EGA)) && (!defined(CONFIG_FB)))
     
    484484        /* Sanity check for the cursor on screen */
    485485        cmp $2000, %ax
    486         jb early_putwchar_cursor_ok
     486        jb early_putuchar_cursor_ok
    487487
    488488                movw $1998, %ax
    489489
    490         early_putwchar_cursor_ok:
     490        early_putuchar_cursor_ok:
    491491
    492492        movw %ax, %bx
     
    497497
    498498        cmp $0x0a, %al
    499         jne early_putwchar_backspace
     499        jne early_putuchar_backspace
    500500
    501501                /* Interpret newline */
     
    511511                subw %dx, %bx
    512512
    513                 jmp early_putwchar_skip
    514 
    515         early_putwchar_backspace:
     513                jmp early_putuchar_skip
     514
     515        early_putuchar_backspace:
    516516
    517517                cmp $0x08, %al
    518                 jne early_putwchar_print
     518                jne early_putuchar_print
    519519
    520520                /* Interpret backspace */
    521521
    522522                cmp $0x0000, %bx
    523                 je early_putwchar_skip
     523                je early_putuchar_skip
    524524
    525525                dec %bx
    526                 jmp early_putwchar_skip
    527 
    528         early_putwchar_print:
     526                jmp early_putuchar_skip
     527
     528        early_putuchar_print:
    529529
    530530                /* Print character */
     
    534534                inc %bx
    535535
    536         early_putwchar_skip:
     536        early_putuchar_skip:
    537537
    538538        /* Sanity check for the cursor on the last line */
    539539        cmp $2000, %bx
    540         jb early_putwchar_no_scroll
     540        jb early_putuchar_no_scroll
    541541
    542542                /* Scroll the screen (24 rows) */
     
    554554                movw $1920, %bx
    555555
    556         early_putwchar_no_scroll:
     556        early_putuchar_no_scroll:
    557557
    558558        /* Write bits 8 - 15 of the cursor address */
     
    583583
    584584        ret
    585 FUNCTION_END(early_putwchar)
    586 
     585FUNCTION_END(early_putuchar)
     586
Note: See TracChangeset for help on using the changeset viewer.