Wikipedia pseudo code is unclear about how to pad SHA-512
Richie is of course correct; the padding needs to be done to form a final block that can also contain the length. As the length encoding is itself static in size, there is no need to pad the length itself.

This is the same as SHA-1 except that the size of the various elements (block size, length encoding) differs.