.section .text.platform

// Prints a string to the serial output, with a trailing newline.
//
// ## Arguments
//
// - x0: The address of the string to print
// - x1: The length of the string to print
//
// ## Side Effects
//
// - Trashes x0, x1, x2, x3, x4, x5, x6, x7
.global platform.debug_println
platform.debug_println:
	str lr, [sp, #-16]!
	bl platform.debug_print
	ldr x0, =platform.debug_println.newline
	mov x1, platform.debug_println.newline.len
	ldr lr, [sp], #16
	b platform.debug_print

.section .rodata.platform

platform.debug_println.newline: .ascii "\r\n"
.set platform.debug_println.newline.len, . - platform.debug_println.newline

// vim: set ft=arm64asm :